MCPcopy Index your code
hub / github.com/nodejs/node / checkGrammarConstructorTypeAnnotation

Function checkGrammarConstructorTypeAnnotation

test/fixtures/snapshot/typescript.js:88938–88943  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

88936 }
88937 }
88938 function checkGrammarConstructorTypeAnnotation(node) {
88939 var type = ts.getEffectiveReturnTypeNode(node);
88940 if (type) {
88941 return grammarErrorOnNode(type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration);
88942 }
88943 }
88944 function checkGrammarProperty(node) {
88945 if (ts.isComputedPropertyName(node.name) && ts.isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101 /* SyntaxKind.InKeyword */) {
88946 return grammarErrorOnNode(node.parent.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);

Callers 1

Calls 1

grammarErrorOnNodeFunction · 0.85

Tested by

no test coverage detected