Skip to content

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

Closed
@DethAriel

Description

@DethAriel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions