#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.