(node)
| 16244 | } |
| 16245 | ts.isExpressionNode = isExpressionNode; |
| 16246 | function isInExpressionContext(node) { |
| 16247 | var parent = node.parent; |
| 16248 | switch (parent.kind) { |
| 16249 | case 254 /* SyntaxKind.VariableDeclaration */: |
| 16250 | case 164 /* SyntaxKind.Parameter */: |
| 16251 | case 167 /* SyntaxKind.PropertyDeclaration */: |
| 16252 | case 166 /* SyntaxKind.PropertySignature */: |
| 16253 | case 299 /* SyntaxKind.EnumMember */: |
| 16254 | case 296 /* SyntaxKind.PropertyAssignment */: |
| 16255 | case 203 /* SyntaxKind.BindingElement */: |
| 16256 | return parent.initializer === node; |
| 16257 | case 238 /* SyntaxKind.ExpressionStatement */: |
| 16258 | case 239 /* SyntaxKind.IfStatement */: |
| 16259 | case 240 /* SyntaxKind.DoStatement */: |
| 16260 | case 241 /* SyntaxKind.WhileStatement */: |
| 16261 | case 247 /* SyntaxKind.ReturnStatement */: |
| 16262 | case 248 /* SyntaxKind.WithStatement */: |
| 16263 | case 249 /* SyntaxKind.SwitchStatement */: |
| 16264 | case 289 /* SyntaxKind.CaseClause */: |
| 16265 | case 251 /* SyntaxKind.ThrowStatement */: |
| 16266 | return parent.expression === node; |
| 16267 | case 242 /* SyntaxKind.ForStatement */: |
| 16268 | var forStatement = parent; |
| 16269 | return (forStatement.initializer === node && forStatement.initializer.kind !== 255 /* SyntaxKind.VariableDeclarationList */) || |
| 16270 | forStatement.condition === node || |
| 16271 | forStatement.incrementor === node; |
| 16272 | case 243 /* SyntaxKind.ForInStatement */: |
| 16273 | case 244 /* SyntaxKind.ForOfStatement */: |
| 16274 | var forInStatement = parent; |
| 16275 | return (forInStatement.initializer === node && forInStatement.initializer.kind !== 255 /* SyntaxKind.VariableDeclarationList */) || |
| 16276 | forInStatement.expression === node; |
| 16277 | case 211 /* SyntaxKind.TypeAssertionExpression */: |
| 16278 | case 229 /* SyntaxKind.AsExpression */: |
| 16279 | return node === parent.expression; |
| 16280 | case 233 /* SyntaxKind.TemplateSpan */: |
| 16281 | return node === parent.expression; |
| 16282 | case 162 /* SyntaxKind.ComputedPropertyName */: |
| 16283 | return node === parent.expression; |
| 16284 | case 165 /* SyntaxKind.Decorator */: |
| 16285 | case 288 /* SyntaxKind.JsxExpression */: |
| 16286 | case 287 /* SyntaxKind.JsxSpreadAttribute */: |
| 16287 | case 298 /* SyntaxKind.SpreadAssignment */: |
| 16288 | return true; |
| 16289 | case 228 /* SyntaxKind.ExpressionWithTypeArguments */: |
| 16290 | return parent.expression === node && !isPartOfTypeNode(parent); |
| 16291 | case 297 /* SyntaxKind.ShorthandPropertyAssignment */: |
| 16292 | return parent.objectAssignmentInitializer === node; |
| 16293 | default: |
| 16294 | return isExpressionNode(parent); |
| 16295 | } |
| 16296 | } |
| 16297 | ts.isInExpressionContext = isInExpressionContext; |
| 16298 | function isPartOfTypeQuery(node) { |
| 16299 | while (node.kind === 161 /* SyntaxKind.QualifiedName */ || node.kind === 79 /* SyntaxKind.Identifier */) { |
no test coverage detected