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

Function isValidIndexKeyType

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

Source from the content-addressed store, hash-verified

60057 return ts.emptyArray;
60058 }
60059 function isValidIndexKeyType(type) {
60060 return !!(type.flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 4096 /* TypeFlags.ESSymbol */)) || isPatternLiteralType(type) ||
60061 !!(type.flags & 2097152 /* TypeFlags.Intersection */) && !isGenericType(type) && ts.some(type.types, isValidIndexKeyType);
60062 }
60063 function getConstraintDeclaration(type) {
60064 return ts.mapDefined(ts.filter(type.symbol && type.symbol.declarations, ts.isTypeParameterDeclaration), ts.getEffectiveConstraintOfTypeParameter)[0];
60065 }

Callers 2

_loop_14Function · 0.85

Calls 3

isPatternLiteralTypeFunction · 0.85
isGenericTypeFunction · 0.85
someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…