Skip to content

"templates-use-public" results in a false-positive when inheritance is in play #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DethAriel opened this issue Feb 16, 2017 · 2 comments

Comments

@DethAriel
Copy link

Consider this code:

export abstract class MyAbstractComponent {
  public something: any;
}

@Component({ 
  template: `{{ something }}`,
})
export class MyRealComponent extends MyAbstractComponent {
}

If you run tslint with "templates-use-public" rule enabled, you'll get an error:

The property "something" that you're trying to access does not exist in the class declaration.

which is kinda true, but this is still a false positive.

@ghsyeung
Copy link
Contributor

Related to #191

@DethAriel
Copy link
Author

@ghsyeung I would even say that it's a duplicate. Closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants