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

Function getTupleElementType

test/fixtures/snapshot/typescript.js:67466–67475  ·  view source on GitHub ↗
(type, index)

Source from the content-addressed store, hash-verified

67464 return isArrayLikeType(type) || isTupleLikeType(type);
67465 }
67466 function getTupleElementType(type, index) {
67467 var propType = getTypeOfPropertyOfType(type, "" + index);
67468 if (propType) {
67469 return propType;
67470 }
67471 if (everyType(type, isTupleType)) {
67472 return mapType(type, function (t) { return getRestTypeOfTupleType(t) || undefinedType; });
67473 }
67474 return undefined;
67475 }
67476 function isNeitherUnitTypeNorNever(type) {
67477 return !(type.flags & (109440 /* TypeFlags.Unit */ | 131072 /* TypeFlags.Never */));
67478 }

Callers 1

Calls 4

getTypeOfPropertyOfTypeFunction · 0.85
everyTypeFunction · 0.85
mapTypeFunction · 0.85
getRestTypeOfTupleTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…