MCPcopy Create free account
hub / github.com/nodejs/node / isPossiblyReducibleByInstantiation

Function isPossiblyReducibleByInstantiation

test/fixtures/snapshot/typescript.js:61856–61861  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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);

Callers 1

getIndexTypeFunction · 0.85

Calls 3

getReducedTypeFunction · 0.85
someMethod · 0.80

Tested by

no test coverage detected