(node, isSuper, propertyName, type)
| 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)) { |
| 75146 | return true; |
| 75147 | } |
| 75148 | var prop = getPropertyOfType(type, propertyName); |
| 75149 | return !!prop && isPropertyAccessible(node, isSuper, /* isWrite */ false, type, prop); |
| 75150 | } |
| 75151 | /** |
| 75152 | * Checks if a property can be accessed in a location. |
| 75153 | * The location is given by the `node` parameter. |
no test coverage detected