MCPcopy Create free account
hub / github.com/nodejs/node / getFreshTypeOfLiteralType

Function getFreshTypeOfLiteralType

test/fixtures/snapshot/typescript.js:63021–63031  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

63019 return type;
63020 }
63021 function getFreshTypeOfLiteralType(type) {
63022 if (type.flags & 2944 /* TypeFlags.Literal */) {
63023 if (!type.freshType) {
63024 var freshType = createLiteralType(type.flags, type.value, type.symbol, type);
63025 freshType.freshType = freshType;
63026 type.freshType = freshType;
63027 }
63028 return type.freshType;
63029 }
63030 return type;
63031 }
63032 function getRegularTypeOfLiteralType(type) {
63033 return type.flags & 2944 /* TypeFlags.Literal */ ? type.regularType :
63034 type.flags & 1048576 /* TypeFlags.Union */ ? (type.regularType || (type.regularType = mapType(type, getRegularTypeOfLiteralType))) :

Callers 3

getDeclaredTypeOfEnumFunction · 0.85
checkExpressionWorkerFunction · 0.85

Calls 1

createLiteralTypeFunction · 0.85

Tested by

no test coverage detected