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

Function isNumericName

test/fixtures/snapshot/typescript.js:73428–73440  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

73426 return literalType;
73427 }
73428 function isNumericName(name) {
73429 switch (name.kind) {
73430 case 162 /* SyntaxKind.ComputedPropertyName */:
73431 return isNumericComputedName(name);
73432 case 79 /* SyntaxKind.Identifier */:
73433 return ts.isNumericLiteralName(name.escapedText);
73434 case 8 /* SyntaxKind.NumericLiteral */:
73435 case 10 /* SyntaxKind.StringLiteral */:
73436 return ts.isNumericLiteralName(name.text);
73437 default:
73438 return false;
73439 }
73440 }
73441 function isNumericComputedName(name) {
73442 // It seems odd to consider an expression of type Any to result in a numeric name,
73443 // but this behavior is consistent with checkIndexedAccess

Callers 1

isSymbolWithNumericNameFunction · 0.85

Calls 1

isNumericComputedNameFunction · 0.85

Tested by

no test coverage detected