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

Function getStringMappingType

test/fixtures/snapshot/typescript.js:61993–61998  ·  view source on GitHub ↗
(symbol, type)

Source from the content-addressed store, hash-verified

61991 return type;
61992 }
61993 function getStringMappingType(symbol, type) {
61994 return type.flags & (1048576 /* TypeFlags.Union */ | 131072 /* TypeFlags.Never */) ? mapType(type, function (t) { return getStringMappingType(symbol, t); }) :
61995 isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) :
61996 type.flags & 128 /* TypeFlags.StringLiteral */ ? getStringLiteralType(applyStringMapping(symbol, type.value)) :
61997 type;
61998 }
61999 function applyStringMapping(symbol, str) {
62000 switch (intrinsicTypeKinds.get(symbol.escapedName)) {
62001 case 0 /* IntrinsicTypeKind.Uppercase */: return str.toUpperCase();

Callers 3

computeBaseConstraintFunction · 0.85
instantiateTypeWorkerFunction · 0.85

Calls 5

mapTypeFunction · 0.85
isGenericIndexTypeFunction · 0.85
getStringLiteralTypeFunction · 0.85
applyStringMappingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…