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

Function indexTypeLessThan

test/fixtures/snapshot/typescript.js:62393–62404  ·  view source on GitHub ↗
(indexType, limit)

Source from the content-addressed store, hash-verified

62391 return getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType);
62392 }
62393 function indexTypeLessThan(indexType, limit) {
62394 return everyType(indexType, function (t) {
62395 if (t.flags & 384 /* TypeFlags.StringOrNumberLiteral */) {
62396 var propName = getPropertyNameFromType(t);
62397 if (ts.isNumericLiteralName(propName)) {
62398 var index = +propName;
62399 return index >= 0 && index < limit;
62400 }
62401 }
62402 return false;
62403 });
62404 }
62405 function getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
62406 if (accessFlags === void 0) { accessFlags = 0 /* AccessFlags.None */; }
62407 if (objectType === wildcardType || indexType === wildcardType) {

Callers 1

Calls 2

everyTypeFunction · 0.85
getPropertyNameFromTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…