This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type checking in matcher_types.js.
Adds explicit casts to clarify two cases where the type checker isn't quite sophisticated enough to infer the correct types. Background: Closure Compiler is trying to land a change to improve inference of qualified names. An upshot of this is that it will soon understand that "this.getDescription" is supposed to be a `function(): string` (rather than just unknown as it does currently), which causes a type error when it tries to return a `string|function(): string` (note that the compiler does not currently propagate the flow-sensitive context that `description` is definitely a string from outside the closure to inside).
- Loading branch information