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

Function isLateBindableName

test/fixtures/snapshot/typescript.js:57681–57688  ·  view source on GitHub ↗

* Indicates whether a declaration name is definitely late-bindable. * A declaration name is only late-bindable if: * - It is a `ComputedPropertyName`. * - Its expression is an `Identifier` or either a `PropertyAccessExpression` an * `ElementAccessExpression` consi

(node)

Source from the content-addressed store, hash-verified

57679 * - The type of its expression is a string or numeric literal type, or is a `unique symbol` type.
57680 */
57681 function isLateBindableName(node) {
57682 if (!ts.isComputedPropertyName(node) && !ts.isElementAccessExpression(node)) {
57683 return false;
57684 }
57685 var expr = ts.isComputedPropertyName(node) ? node.expression : node.argumentExpression;
57686 return ts.isEntityNameExpression(expr)
57687 && isTypeUsableAsPropertyName(ts.isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(expr));
57688 }
57689 function isLateBoundName(name) {
57690 return name.charCodeAt(0) === 95 /* CharacterCodes._ */ &&
57691 name.charCodeAt(1) === 95 /* CharacterCodes._ */ &&

Callers 3

hasLateBindableNameFunction · 0.85
isNonBindableDynamicNameFunction · 0.85

Calls 3

checkExpressionCachedFunction · 0.85

Tested by

no test coverage detected