* Checks if an existing property access is valid for completions purposes. * @param node a property access-like node where we want to check if we can access a property. * This node does not need to be an access of the property we are checking. * e.g. in completions, this n
(node, type, property)
| 75136 | * @param property the accessed property's symbol. |
| 75137 | */ |
| 75138 | function isValidPropertyAccessForCompletions(node, type, property) { |
| 75139 | return isPropertyAccessible(node, node.kind === 206 /* SyntaxKind.PropertyAccessExpression */ && node.expression.kind === 106 /* SyntaxKind.SuperKeyword */, |
| 75140 | /* isWrite */ false, type, property); |
| 75141 | // Previously we validated the 'this' type of methods but this adversely affected performance. See #31377 for more context. |
| 75142 | } |
| 75143 | function isValidPropertyAccessWithType(node, isSuper, propertyName, type) { |
| 75144 | // Short-circuiting for improved performance. |
| 75145 | if (isTypeAny(type)) { |
no test coverage detected