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

Function getSimplifiedType

test/fixtures/snapshot/typescript.js:62281–62285  ·  view source on GitHub ↗
(type, writing)

Source from the content-addressed store, hash-verified

62279 (type.flags & (58982400 /* TypeFlags.InstantiableNonPrimitive */ | 4194304 /* TypeFlags.Index */ | 134217728 /* TypeFlags.TemplateLiteral */ | 268435456 /* TypeFlags.StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* ObjectFlags.IsGenericIndexType */ : 0);
62280 }
62281 function getSimplifiedType(type, writing) {
62282 return type.flags & 8388608 /* TypeFlags.IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
62283 type.flags & 16777216 /* TypeFlags.Conditional */ ? getSimplifiedConditionalType(type, writing) :
62284 type;
62285 }
62286 function distributeIndexOverObjectType(objectType, indexType, writing) {
62287 // (T | U)[K] -> T[K] | U[K] (reading)
62288 // (T | U)[K] -> T[K] & U[K] (writing)

Calls 2

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…