-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better handling of circular JS containers in getTypeOfVariableOrParam…
…eterOrProperty (#24732) * avoid circularity in getTypeOfVariableOrParameterOrProperty Modify getTypeOfVariableOrParameterOrProperty to get the type of the variable declaration before widening it. This essentially avoids some circularities by (1) setting the type of the variable declaration to the unwidened type (2) updating the type of the variable declaration to the widened one. You will still get a circular noImplicitAny in (1), for expressions that actually are circular, but not in (2), for the containers of things that are not themselves circular. * Stop checking js init object literals via checkObjectLiteral * checkBinaryExpression: new code for special assignments * Chained lookup for js initializer type * Check for JS-specific types only once Also make sure to respect the type annotation if there is one. * Accept API changes
- Loading branch information
Showing
45 changed files
with
1,231 additions
and
999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.