| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| function isApparentTypePosition(node: Node) { | ||
| const parent = node.parent; | ||
| return parent.kind === SyntaxKind.PropertyAccessExpression || |
There was a problem hiding this comment.
&& (<PropertyAccessExpression >parent).expression === node; ?
Sorry, something went wrong.
There was a problem hiding this comment.
No need to. This function is only ever called on the left hand side of a property access expression (the right hand side is just an identifier and not actually an expression).
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
With this PR, when a node is the left hand expression of a property access, element access, or call expression, and the type of the node includes type variables with constraints that are nullable, we fetch the apparent type of the node before performing control flow analysis such that narrowings apply to the constraint type. For example:
Prior to this PR, the property access, element access, and call expressions above were errors.
Fixes #14091.
Fixes #14415.