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

Function hasDynamicName

test/fixtures/snapshot/typescript.js:17502–17505  ·  view source on GitHub ↗

* A declaration has a dynamic name if all of the following are true: * 1. The declaration has a computed property name. * 2. The computed name is *not* expressed as a StringLiteral. * 3. The computed name is *not* expressed as a NumericLiteral. * 4. The computed name is *

(declaration)

Source from the content-addressed store, hash-verified

17500 * immediately followed by a NumericLiteral.
17501 */
17502 function hasDynamicName(declaration) {
17503 var name = ts.getNameOfDeclaration(declaration);
17504 return !!name && isDynamicName(name);
17505 }
17506 ts.hasDynamicName = hasDynamicName;
17507 function isDynamicName(name) {
17508 if (!(name.kind === 162 /* SyntaxKind.ComputedPropertyName */ || name.kind === 207 /* SyntaxKind.ElementAccessExpression */)) {

Callers 1

Calls 1

isDynamicNameFunction · 0.85

Tested by

no test coverage detected