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

Function getTypeOfDestructuredArrayElement

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

Source from the content-addressed store, hash-verified

69695 return getTypeOfPropertyOfType(type, text) || includeUndefinedInIndexSignature((_a = getApplicableIndexInfoForName(type, text)) === null || _a === void 0 ? void 0 : _a.type) || errorType;
69696 }
69697 function getTypeOfDestructuredArrayElement(type, index) {
69698 return everyType(type, isTupleLikeType) && getTupleElementType(type, index) ||
69699 includeUndefinedInIndexSignature(checkIteratedTypeOrElementType(65 /* IterationUse.Destructuring */, type, undefinedType, /*errorNode*/ undefined)) ||
69700 errorType;
69701 }
69702 function includeUndefinedInIndexSignature(type) {
69703 if (!type)
69704 return type;

Calls 4

everyTypeFunction · 0.85
getTupleElementTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…