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

Function getStringLiteralType

test/fixtures/snapshot/typescript.js:63040–63044  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

63038 return !!(type.flags & 2944 /* TypeFlags.Literal */) && type.freshType === type;
63039 }
63040 function getStringLiteralType(value) {
63041 var type;
63042 return stringLiteralTypes.get(value) ||
63043 (stringLiteralTypes.set(value, type = createLiteralType(128 /* TypeFlags.StringLiteral */, value)), type);
63044 }
63045 function getNumberLiteralType(value) {
63046 var type;
63047 return numberLiteralTypes.get(value) ||

Callers 15

createTypeCheckerFunction · 0.85
getKnownKeysOfTupleTypeFunction · 0.85
getTemplateLiteralTypeFunction · 0.85
getStringMappingTypeFunction · 0.85
generateJsxAttributesFunction · 0.85
elaborateJsxComponentsFunction · 0.85
addMatchFunction · 0.85

Calls 3

createLiteralTypeFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…