Skip to content

Type checker does not warn when no type inference can be made #26750

@powerivq

Description

@powerivq

#26483

In amp-auto-lightbox, the this.element does not have a type declaration. The use of this.element is therefore not checked against available methods by type checker. Any method in the entire codebase having the same method name would satisfy the type checker.

In case of a refactoring where the method is moved from a class to another, the type checker will pass.

We could look at whether we should generate warning or block the PR when insufficient information is provided (especially in extensions) for the type checker to properly do its jobs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions