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

Function getOptionalExpressionType

test/fixtures/snapshot/typescript.js:67664–67668  ·  view source on GitHub ↗
(exprType, expression)

Source from the content-addressed store, hash-verified

67662 return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type;
67663 }
67664 function getOptionalExpressionType(exprType, expression) {
67665 return ts.isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) :
67666 ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) :
67667 exprType;
67668 }
67669 function removeMissingType(type, isOptional) {
67670 return exactOptionalPropertyTypes && isOptional ? removeType(type, missingType) : type;
67671 }

Callers 6

getEffectsSignatureFunction · 0.85
checkPropertyAccessChainFunction · 0.85
checkElementAccessChainFunction · 0.85
resolveCallExpressionFunction · 0.85
checkNonNullChainFunction · 0.85

Calls 2

getNonNullableTypeFunction · 0.85
removeOptionalTypeMarkerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…