(objectType, indexType, 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) |
| 62289 | // (T & U)[K] -> T[K] & U[K] |
| 62290 | if (objectType.flags & 3145728 /* TypeFlags.UnionOrIntersection */) { |
| 62291 | var types = ts.map(objectType.types, function (t) { return getSimplifiedType(getIndexedAccessType(t, indexType), writing); }); |
| 62292 | return objectType.flags & 2097152 /* TypeFlags.Intersection */ || writing ? getIntersectionType(types) : getUnionType(types); |
| 62293 | } |
| 62294 | } |
| 62295 | function distributeObjectOverIndexType(objectType, indexType, writing) { |
| 62296 | // T[A | B] -> T[A] | T[B] (reading) |
| 62297 | // T[A | B] -> T[A] & T[B] (writing) |
no test coverage detected
searching dependent graphs…