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

Function getIndexTypeForGenericType

test/fixtures/snapshot/typescript.js:61744–61748  ·  view source on GitHub ↗
(type, stringsOnly)

Source from the content-addressed store, hash-verified

61742 return result;
61743 }
61744 function getIndexTypeForGenericType(type, stringsOnly) {
61745 return stringsOnly ?
61746 type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(type, /*stringsOnly*/ true)) :
61747 type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, /*stringsOnly*/ false));
61748 }
61749 /**
61750 * This roughly mirrors `resolveMappedTypeMembers` in the nongeneric case, except only reports a union of the keys calculated,
61751 * rather than manufacturing the properties. We can't just fetch the `constraintType` since that would ignore mappings

Callers 2

getIndexTypeFunction · 0.85

Calls 1

createIndexTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…