* A union type which is reducible upon instantiation (meaning some members are removed under certain instantiations) * must be kept generic, as that instantiation information needs to flow through the type system. By replacing all * type parameters in the union with a special never
(type)
| 61854 | * to reduce the resulting type if possible (since only intersections with conflicting literal-typed properties are reducible). |
| 61855 | */ |
| 61856 | function isPossiblyReducibleByInstantiation(type) { |
| 61857 | return ts.some(type.types, function (t) { |
| 61858 | var uniqueFilled = getUniqueLiteralFilledInstantiation(t); |
| 61859 | return getReducedType(uniqueFilled) !== uniqueFilled; |
| 61860 | }); |
| 61861 | } |
| 61862 | function getIndexType(type, stringsOnly, noIndexSignatures) { |
| 61863 | if (stringsOnly === void 0) { stringsOnly = keyofStringsOnly; } |
| 61864 | type = getReducedType(type); |
no test coverage detected