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

Function isKeyTypeIncluded

test/fixtures/snapshot/typescript.js:61839–61841  ·  view source on GitHub ↗
(keyType, include)

Source from the content-addressed store, hash-verified

61837 return neverType;
61838 }
61839 function isKeyTypeIncluded(keyType, include) {
61840 return !!(keyType.flags & include || keyType.flags & 2097152 /* TypeFlags.Intersection */ && ts.some(keyType.types, function (t) { return isKeyTypeIncluded(t, include); }));
61841 }
61842 function getLiteralTypeFromProperties(type, include, includeOrigin) {
61843 var origin = includeOrigin && (ts.getObjectFlags(type) & (3 /* ObjectFlags.ClassOrInterface */ | 4 /* ObjectFlags.Reference */) || type.aliasSymbol) ? createOriginIndexType(type) : undefined;
61844 var propertyTypes = ts.map(getPropertiesOfType(type), function (prop) { return getLiteralTypeFromProperty(prop, include); });

Callers 1

Calls 1

someMethod · 0.80

Tested by

no test coverage detected