MCPcopy Create free account
hub / github.com/nodejs/node / isPropertyNameLiteral

Function isPropertyNameLiteral

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

Source from the content-addressed store, hash-verified

17539 }
17540 ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode;
17541 function isPropertyNameLiteral(node) {
17542 switch (node.kind) {
17543 case 79 /* SyntaxKind.Identifier */:
17544 case 10 /* SyntaxKind.StringLiteral */:
17545 case 14 /* SyntaxKind.NoSubstitutionTemplateLiteral */:
17546 case 8 /* SyntaxKind.NumericLiteral */:
17547 return true;
17548 default:
17549 return false;
17550 }
17551 }
17552 ts.isPropertyNameLiteral = isPropertyNameLiteral;
17553 function getTextOfIdentifierOrLiteral(node) {
17554 return ts.isMemberName(node) ? ts.idText(node) : node.text;

Callers 1

isSameEntityNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected