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

Function checkPropertyDeclaration

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

Source from the content-addressed store, hash-verified

80427 }
80428 }
80429 function checkPropertyDeclaration(node) {
80430 // Grammar checking
80431 if (!checkGrammarDecoratorsAndModifiers(node) && !checkGrammarProperty(node))
80432 checkGrammarComputedPropertyName(node.name);
80433 checkVariableLikeDeclaration(node);
80434 setNodeLinksForPrivateIdentifierScope(node);
80435 // property signatures already report "initializer not allowed in ambient context" elsewhere
80436 if (ts.hasSyntacticModifier(node, 128 /* ModifierFlags.Abstract */) && node.kind === 167 /* SyntaxKind.PropertyDeclaration */ && node.initializer) {
80437 error(node, ts.Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, ts.declarationNameToString(node.name));
80438 }
80439 }
80440 function checkPropertySignature(node) {
80441 if (ts.isPrivateIdentifier(node.name)) {
80442 error(node, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);

Callers 2

checkPropertySignatureFunction · 0.85
checkSourceElementWorkerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…