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

Function getExtractStringType

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

Source from the content-addressed store, hash-verified

61874 getLiteralTypeFromProperties(type, (noIndexSignatures ? 128 /* TypeFlags.StringLiteral */ : 402653316 /* TypeFlags.StringLike */) | (stringsOnly ? 0 : 296 /* TypeFlags.NumberLike */ | 12288 /* TypeFlags.ESSymbolLike */), stringsOnly === keyofStringsOnly && !noIndexSignatures);
61875 }
61876 function getExtractStringType(type) {
61877 if (keyofStringsOnly) {
61878 return type;
61879 }
61880 var extractTypeAlias = getGlobalExtractSymbol();
61881 return extractTypeAlias ? getTypeAliasInstantiation(extractTypeAlias, [type, stringType]) : stringType;
61882 }
61883 function getIndexTypeOrString(type) {
61884 var indexType = getExtractStringType(getIndexType(type));
61885 return indexType.flags & 131072 /* TypeFlags.Never */ ? stringType : indexType;

Callers 2

getIndexTypeOrStringFunction · 0.85

Calls 2

getGlobalExtractSymbolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…