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

Function getPropertyNameFromType

test/fixtures/snapshot/typescript.js:57716–57724  ·  view source on GitHub ↗

* Gets the symbolic name for a member from its type.

(type)

Source from the content-addressed store, hash-verified

57714 * Gets the symbolic name for a member from its type.
57715 */
57716 function getPropertyNameFromType(type) {
57717 if (type.flags & 8192 /* TypeFlags.UniqueESSymbol */) {
57718 return type.escapedName;
57719 }
57720 if (type.flags & (128 /* TypeFlags.StringLiteral */ | 256 /* TypeFlags.NumberLiteral */)) {
57721 return ts.escapeLeadingUnderscores("" + type.value);
57722 }
57723 return ts.Debug.fail();
57724 }
57725 /**
57726 * Adds a declaration to a late-bound dynamic member. This performs the same function for
57727 * late-bound members that `addDeclarationToSymbol` in binder.ts performs for early-bound

Calls 1

failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…