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

Function checkExpressionForMutableLocation

test/fixtures/snapshot/typescript.js:79610–79615  ·  view source on GitHub ↗
(node, checkMode, contextualType, forceTuple)

Source from the content-addressed store, hash-verified

79608 (ts.isPropertyAssignment(parent) || ts.isShorthandPropertyAssignment(parent) || ts.isTemplateSpan(parent)) && isConstContext(parent.parent);
79609 }
79610 function checkExpressionForMutableLocation(node, checkMode, contextualType, forceTuple) {
79611 var type = checkExpression(node, checkMode, forceTuple);
79612 return isConstContext(node) || ts.isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) :
79613 isTypeAssertion(node) ? type :
79614 getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType(node) : contextualType, node));
79615 }
79616 function checkPropertyAssignment(node, checkMode) {
79617 // Do not use hasDynamicName here, because that returns false for well known symbols.
79618 // We want to perform checkComputedPropertyName for all computed properties, including

Calls 7

isConstContextFunction · 0.85
isTypeAssertionFunction · 0.85
getContextualTypeFunction · 0.85
checkExpressionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…