diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3501c88b95fcd..204ee4b56dbe6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14607,6 +14607,13 @@ namespace ts { return type[cache] = type; } + function isConditionalTypeAlwaysTrueDisregardingInferTypes(type: ConditionalType) { + const extendsInferParamMapper = type.root.inferTypeParameters && createTypeMapper(type.root.inferTypeParameters, map(type.root.inferTypeParameters, () => wildcardType)); + const checkType = type.checkType; + const extendsType = type.extendsType; + return isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(instantiateType(extendsType, extendsInferParamMapper))); + } + function getSimplifiedConditionalType(type: ConditionalType, writing: boolean) { const checkType = type.checkType; const extendsType = type.extendsType; @@ -18139,6 +18146,36 @@ namespace ts { } } } + else if (target.flags & TypeFlags.Conditional) { + const c = target as ConditionalType; + // Check if the conditional is always true or always false but still deferred for distribution purposes + const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType)); + const skipFalse = !skipTrue && isConditionalTypeAlwaysTrueDisregardingInferTypes(c); + + // Instantiate with a replacement mapper if the conditional is distributive, replacing the check type with a clone of itself, + // this way {x: string | number, y: string | number} -> (T extends T ? { x: T, y: T } : never) appropriately _fails_ when + // T = string | number (since that will end up distributing and producing `{x: string, y: string} | {x: number, y: number}`, + // to which `{x: string | number, y: string | number}` isn't assignable) + let distributionMapper: TypeMapper | undefined; + const checkVar = getActualTypeVariable(c.root.checkType); + if (c.root.isDistributive && checkVar.flags & TypeFlags.TypeParameter) { + const newParam = cloneTypeParameter(checkVar); + distributionMapper = prependTypeMapping(checkVar, newParam, c.mapper); + newParam.mapper = distributionMapper; + } + + // TODO: Find a nice way to include potential conditional type breakdowns in error output, if they seem good (they usually don't) + let localResult: Ternary | undefined; + if (skipTrue || (localResult = isRelatedTo(source, distributionMapper ? instantiateType(getTypeFromTypeNode(c.root.node.trueType), distributionMapper) : getTrueTypeFromConditionalType(c), /*reportErrors*/ false))) { + if (!skipFalse) { + localResult = (localResult || Ternary.Maybe) & isRelatedTo(source, distributionMapper ? instantiateType(getTypeFromTypeNode(c.root.node.falseType), distributionMapper) : getFalseTypeFromConditionalType(c), /*reportErrors*/ false); + } + } + if (localResult) { + resetErrorInfo(saveErrorInfo); + return localResult; + } + } else if (target.flags & TypeFlags.TemplateLiteral && source.flags & TypeFlags.StringLiteral) { if (isPatternLiteralType(target)) { // match all non-`string` segments diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt new file mode 100644 index 0000000000000..acb5354e1f076 --- /dev/null +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.errors.txt @@ -0,0 +1,149 @@ +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(28,20): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(29,21): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(39,3): error TS2322: Type '{ x: T; y: T; }' is not assignable to type 'T extends T ? { x: T; y: T; } : never'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(46,3): error TS2322: Type 'string' is not assignable to type 'Foo'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(63,9): error TS2322: Type '{ a: number; b: number; }' is not assignable to type '[T] extends [[infer U]] ? U : { b: number; }'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(95,23): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Unwrap'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(106,3): error TS2322: Type 'Q' is not assignable to type 'InferBecauseWhyNot'. + Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNot'. +tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts(116,3): error TS2322: Type 'Q' is not assignable to type 'InferBecauseWhyNotDistributive'. + Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNotDistributive'. + + +==== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts (8 errors) ==== + export type FilterPropsByType = { + [K in keyof T]: T[K] extends TT ? K : never + }[keyof T]; + + function select< + T extends string | number, + TList extends object, + TValueProp extends FilterPropsByType + >(property: T, list: TList[], valueProp: TValueProp) {} + + export function func(x: XX, tipos: { value: XX }[]) { + select(x, tipos, "value"); + } + + declare function onlyNullablePlease( + value: T + ): void; + + declare function onlyNullablePlease2< + T extends [null] extends [T] ? any : never + >(value: T): void; + + declare var z: string | null; + onlyNullablePlease(z); // works as expected + onlyNullablePlease2(z); // works as expected + + declare var y: string; + onlyNullablePlease(y); // error as expected + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'. + onlyNullablePlease2(y); // error as expected + ~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'. + + function f(t: T) { + var x: T | null = Math.random() > 0.5 ? null : t; + onlyNullablePlease(x); // should work + onlyNullablePlease2(x); // should work + } + + function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) { + t1 = t2; // OK + t2 = t1; // should fail + ~~ +!!! error TS2322: Type '{ x: T; y: T; }' is not assignable to type 'T extends T ? { x: T; y: T; } : never'. + } + + type Foo = T extends true ? string : "a"; + + function test(x: Foo, s: string) { + x = "a"; // Currently an error, should be ok + x = s; // Error + ~ +!!! error TS2322: Type 'string' is not assignable to type 'Foo'. + } + + // #26933 + type Distributive = T extends { a: number } ? { a: number } : { b: number }; + function testAssignabilityToConditionalType() { + const o = { a: 1, b: 2 }; + const x: [T] extends [string] + ? { y: number } + : { a: number; b: number } = undefined!; + // Simple case: OK + const o1: [T] extends [number] ? { a: number } : { b: number } = o; + // Simple case where source happens to be a conditional type: also OK + const x1: [T] extends [number] + ? ([T] extends [string] ? { y: number } : { a: number }) + : ([T] extends [string] ? { y: number } : { b: number }) = x; + // Infer type parameters: no good + const o2: [T] extends [[infer U]] ? U : { b: number } = o; + ~~ +!!! error TS2322: Type '{ a: number; b: number; }' is not assignable to type '[T] extends [[infer U]] ? U : { b: number; }'. + + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. + // There's an argument for the result of dumping `never` into a distributive conditional + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + + // Distributive where T might instantiate to never: no good + const o3: Distributive = o; + // Distributive where T & string might instantiate to never: also no good + const o4: Distributive = o; + // Distributive where {a: T} cannot instantiate to never: OK + const o5: Distributive<{ a: T }> = o; + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good + const o6: Distributive<[T] extends [never] ? { a: number } : never> = o; + } + + type Wrapped = { ___secret: T }; + type Unwrap = T extends Wrapped ? U : T; + + declare function set( + obj: T, + key: K, + value: Unwrap + ): Unwrap; + + class Foo2 { + prop!: Wrapped; + + method() { + set(this, "prop", "hi"); // <-- type error + ~~~~ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Unwrap'. + } + } + + set(new Foo2(), "prop", "hi"); // <-- typechecks + + type InferBecauseWhyNot = [T] extends [(p: infer P1) => any] + ? P1 | T + : never; + + function f3 any>(x: Q): InferBecauseWhyNot { + return x; + ~~~~~~~~~ +!!! error TS2322: Type 'Q' is not assignable to type 'InferBecauseWhyNot'. +!!! error TS2322: Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNot'. + } + + type InferBecauseWhyNotDistributive = T extends (p: infer P1) => any + ? P1 | T + : never; + + function f4 any>( + x: Q + ): InferBecauseWhyNotDistributive { + return x; // should fail + ~~~~~~~~~ +!!! error TS2322: Type 'Q' is not assignable to type 'InferBecauseWhyNotDistributive'. +!!! error TS2322: Type '(arg: any) => any' is not assignable to type 'InferBecauseWhyNotDistributive'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.js b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.js new file mode 100644 index 0000000000000..605957484467f --- /dev/null +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.js @@ -0,0 +1,185 @@ +//// [conditionalTypeAssignabilityWhenDeferred.ts] +export type FilterPropsByType = { + [K in keyof T]: T[K] extends TT ? K : never +}[keyof T]; + +function select< + T extends string | number, + TList extends object, + TValueProp extends FilterPropsByType +>(property: T, list: TList[], valueProp: TValueProp) {} + +export function func(x: XX, tipos: { value: XX }[]) { + select(x, tipos, "value"); +} + +declare function onlyNullablePlease( + value: T +): void; + +declare function onlyNullablePlease2< + T extends [null] extends [T] ? any : never +>(value: T): void; + +declare var z: string | null; +onlyNullablePlease(z); // works as expected +onlyNullablePlease2(z); // works as expected + +declare var y: string; +onlyNullablePlease(y); // error as expected +onlyNullablePlease2(y); // error as expected + +function f(t: T) { + var x: T | null = Math.random() > 0.5 ? null : t; + onlyNullablePlease(x); // should work + onlyNullablePlease2(x); // should work +} + +function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) { + t1 = t2; // OK + t2 = t1; // should fail +} + +type Foo = T extends true ? string : "a"; + +function test(x: Foo, s: string) { + x = "a"; // Currently an error, should be ok + x = s; // Error +} + +// #26933 +type Distributive = T extends { a: number } ? { a: number } : { b: number }; +function testAssignabilityToConditionalType() { + const o = { a: 1, b: 2 }; + const x: [T] extends [string] + ? { y: number } + : { a: number; b: number } = undefined!; + // Simple case: OK + const o1: [T] extends [number] ? { a: number } : { b: number } = o; + // Simple case where source happens to be a conditional type: also OK + const x1: [T] extends [number] + ? ([T] extends [string] ? { y: number } : { a: number }) + : ([T] extends [string] ? { y: number } : { b: number }) = x; + // Infer type parameters: no good + const o2: [T] extends [[infer U]] ? U : { b: number } = o; + + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. + // There's an argument for the result of dumping `never` into a distributive conditional + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + + // Distributive where T might instantiate to never: no good + const o3: Distributive = o; + // Distributive where T & string might instantiate to never: also no good + const o4: Distributive = o; + // Distributive where {a: T} cannot instantiate to never: OK + const o5: Distributive<{ a: T }> = o; + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good + const o6: Distributive<[T] extends [never] ? { a: number } : never> = o; +} + +type Wrapped = { ___secret: T }; +type Unwrap = T extends Wrapped ? U : T; + +declare function set( + obj: T, + key: K, + value: Unwrap +): Unwrap; + +class Foo2 { + prop!: Wrapped; + + method() { + set(this, "prop", "hi"); // <-- type error + } +} + +set(new Foo2(), "prop", "hi"); // <-- typechecks + +type InferBecauseWhyNot = [T] extends [(p: infer P1) => any] + ? P1 | T + : never; + +function f3 any>(x: Q): InferBecauseWhyNot { + return x; +} + +type InferBecauseWhyNotDistributive = T extends (p: infer P1) => any + ? P1 | T + : never; + +function f4 any>( + x: Q +): InferBecauseWhyNotDistributive { + return x; // should fail +} + + +//// [conditionalTypeAssignabilityWhenDeferred.js] +"use strict"; +exports.__esModule = true; +exports.func = void 0; +function select(property, list, valueProp) { } +function func(x, tipos) { + select(x, tipos, "value"); +} +exports.func = func; +onlyNullablePlease(z); // works as expected +onlyNullablePlease2(z); // works as expected +onlyNullablePlease(y); // error as expected +onlyNullablePlease2(y); // error as expected +function f(t) { + var x = Math.random() > 0.5 ? null : t; + onlyNullablePlease(x); // should work + onlyNullablePlease2(x); // should work +} +function f2(t1, t2) { + t1 = t2; // OK + t2 = t1; // should fail +} +function test(x, s) { + x = "a"; // Currently an error, should be ok + x = s; // Error +} +function testAssignabilityToConditionalType() { + var o = { a: 1, b: 2 }; + var x = undefined; + // Simple case: OK + var o1 = o; + // Simple case where source happens to be a conditional type: also OK + var x1 = x; + // Infer type parameters: no good + var o2 = o; + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. + // There's an argument for the result of dumping `never` into a distributive conditional + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + // Distributive where T might instantiate to never: no good + var o3 = o; + // Distributive where T & string might instantiate to never: also no good + var o4 = o; + // Distributive where {a: T} cannot instantiate to never: OK + var o5 = o; + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good + var o6 = o; +} +var Foo2 = /** @class */ (function () { + function Foo2() { + } + Foo2.prototype.method = function () { + set(this, "prop", "hi"); // <-- type error + }; + return Foo2; +}()); +set(new Foo2(), "prop", "hi"); // <-- typechecks +function f3(x) { + return x; +} +function f4(x) { + return x; // should fail +} diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.symbols b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.symbols new file mode 100644 index 0000000000000..575e09460c822 --- /dev/null +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.symbols @@ -0,0 +1,385 @@ +=== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts === +export type FilterPropsByType = { +>FilterPropsByType : Symbol(FilterPropsByType, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 0)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 30)) +>TT : Symbol(TT, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 32)) + + [K in keyof T]: T[K] extends TT ? K : never +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 1, 3)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 30)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 30)) +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 1, 3)) +>TT : Symbol(TT, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 32)) +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 1, 3)) + +}[keyof T]; +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 30)) + +function select< +>select : Symbol(select, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 2, 11)) + + T extends string | number, +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 4, 16)) + + TList extends object, +>TList : Symbol(TList, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 5, 28)) + + TValueProp extends FilterPropsByType +>TValueProp : Symbol(TValueProp, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 6, 23)) +>FilterPropsByType : Symbol(FilterPropsByType, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 0, 0)) +>TList : Symbol(TList, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 5, 28)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 4, 16)) + +>(property: T, list: TList[], valueProp: TValueProp) {} +>property : Symbol(property, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 8, 2)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 4, 16)) +>list : Symbol(list, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 8, 14)) +>TList : Symbol(TList, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 5, 28)) +>valueProp : Symbol(valueProp, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 8, 29)) +>TValueProp : Symbol(TValueProp, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 6, 23)) + +export function func(x: XX, tipos: { value: XX }[]) { +>func : Symbol(func, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 8, 55)) +>XX : Symbol(XX, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 21)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 40)) +>XX : Symbol(XX, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 21)) +>tipos : Symbol(tipos, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 46)) +>value : Symbol(value, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 55)) +>XX : Symbol(XX, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 21)) + + select(x, tipos, "value"); +>select : Symbol(select, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 2, 11)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 40)) +>tipos : Symbol(tipos, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 10, 46)) +} + +declare function onlyNullablePlease( +>onlyNullablePlease : Symbol(onlyNullablePlease, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 12, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 14, 36)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 14, 36)) + + value: T +>value : Symbol(value, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 14, 76)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 14, 36)) + +): void; + +declare function onlyNullablePlease2< +>onlyNullablePlease2 : Symbol(onlyNullablePlease2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 16, 8)) + + T extends [null] extends [T] ? any : never +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 18, 37)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 18, 37)) + +>(value: T): void; +>value : Symbol(value, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 20, 2)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 18, 37)) + +declare var z: string | null; +>z : Symbol(z, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 22, 11)) + +onlyNullablePlease(z); // works as expected +>onlyNullablePlease : Symbol(onlyNullablePlease, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 12, 1)) +>z : Symbol(z, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 22, 11)) + +onlyNullablePlease2(z); // works as expected +>onlyNullablePlease2 : Symbol(onlyNullablePlease2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 16, 8)) +>z : Symbol(z, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 22, 11)) + +declare var y: string; +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 26, 11)) + +onlyNullablePlease(y); // error as expected +>onlyNullablePlease : Symbol(onlyNullablePlease, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 12, 1)) +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 26, 11)) + +onlyNullablePlease2(y); // error as expected +>onlyNullablePlease2 : Symbol(onlyNullablePlease2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 16, 8)) +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 26, 11)) + +function f(t: T) { +>f : Symbol(f, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 28, 23)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 11)) +>t : Symbol(t, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 14)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 11)) + + var x: T | null = Math.random() > 0.5 ? null : t; +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 31, 5)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 11)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>t : Symbol(t, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 14)) + + onlyNullablePlease(x); // should work +>onlyNullablePlease : Symbol(onlyNullablePlease, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 12, 1)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 31, 5)) + + onlyNullablePlease2(x); // should work +>onlyNullablePlease2 : Symbol(onlyNullablePlease2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 16, 8)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 31, 5)) +} + +function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) { +>f2 : Symbol(f2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 34, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) +>t1 : Symbol(t1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 15)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 20)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 26)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) +>t2 : Symbol(t2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 34)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 54)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 60)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 12)) + + t1 = t2; // OK +>t1 : Symbol(t1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 15)) +>t2 : Symbol(t2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 34)) + + t2 = t1; // should fail +>t2 : Symbol(t2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 34)) +>t1 : Symbol(t1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 36, 15)) +} + +type Foo = T extends true ? string : "a"; +>Foo : Symbol(Foo, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 39, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 41, 9)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 41, 9)) + +function test(x: Foo, s: string) { +>test : Symbol(test, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 41, 44)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 14)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 17)) +>Foo : Symbol(Foo, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 39, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 14)) +>s : Symbol(s, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 27)) + + x = "a"; // Currently an error, should be ok +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 17)) + + x = s; // Error +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 17)) +>s : Symbol(s, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 43, 27)) +} + +// #26933 +type Distributive = T extends { a: number } ? { a: number } : { b: number }; +>Distributive : Symbol(Distributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 46, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 49, 18)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 49, 18)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 49, 34)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 49, 50)) +>b : Symbol(b, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 49, 66)) + +function testAssignabilityToConditionalType() { +>testAssignabilityToConditionalType : Symbol(testAssignabilityToConditionalType, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 49, 79)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) + + const o = { a: 1, b: 2 }; +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 13)) +>b : Symbol(b, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 19)) + + const x: [T] extends [string] +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 52, 7)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) + + ? { y: number } +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 53, 7)) + + : { a: number; b: number } = undefined!; +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 54, 7)) +>b : Symbol(b, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 54, 18)) +>undefined : Symbol(undefined) + + // Simple case: OK + const o1: [T] extends [number] ? { a: number } : { b: number } = o; +>o1 : Symbol(o1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 56, 7)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 56, 36)) +>b : Symbol(b, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 56, 52)) +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) + + // Simple case where source happens to be a conditional type: also OK + const x1: [T] extends [number] +>x1 : Symbol(x1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 58, 7)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) + + ? ([T] extends [string] ? { y: number } : { a: number }) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 59, 31)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 59, 47)) + + : ([T] extends [string] ? { y: number } : { b: number }) = x; +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>y : Symbol(y, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 60, 31)) +>b : Symbol(b, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 60, 47)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 52, 7)) + + // Infer type parameters: no good + const o2: [T] extends [[infer U]] ? U : { b: number } = o; +>o2 : Symbol(o2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 62, 7)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>U : Symbol(U, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 62, 31)) +>U : Symbol(U, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 62, 31)) +>b : Symbol(b, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 62, 43)) +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) + + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. + // There's an argument for the result of dumping `never` into a distributive conditional + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + + // Distributive where T might instantiate to never: no good + const o3: Distributive = o; +>o3 : Symbol(o3, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 72, 7)) +>Distributive : Symbol(Distributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 46, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) + + // Distributive where T & string might instantiate to never: also no good + const o4: Distributive = o; +>o4 : Symbol(o4, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 74, 7)) +>Distributive : Symbol(Distributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 46, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) + + // Distributive where {a: T} cannot instantiate to never: OK + const o5: Distributive<{ a: T }> = o; +>o5 : Symbol(o5, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 76, 7)) +>Distributive : Symbol(Distributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 46, 1)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 76, 26)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) + + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good + const o6: Distributive<[T] extends [never] ? { a: number } : never> = o; +>o6 : Symbol(o6, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 78, 7)) +>Distributive : Symbol(Distributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 46, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 50, 44)) +>a : Symbol(a, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 78, 48)) +>o : Symbol(o, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 51, 7)) +} + +type Wrapped = { ___secret: T }; +>Wrapped : Symbol(Wrapped, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 79, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 13)) +>___secret : Symbol(___secret, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 19)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 13)) + +type Unwrap = T extends Wrapped ? U : T; +>Unwrap : Symbol(Unwrap, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 35)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 12)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 12)) +>Wrapped : Symbol(Wrapped, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 79, 1)) +>U : Symbol(U, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 40)) +>U : Symbol(U, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 40)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 12)) + +declare function set( +>set : Symbol(set, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 52)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 21)) +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 23)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 21)) + + obj: T, +>obj : Symbol(obj, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 43)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 21)) + + key: K, +>key : Symbol(key, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 85, 9)) +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 23)) + + value: Unwrap +>value : Symbol(value, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 86, 9)) +>Unwrap : Symbol(Unwrap, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 35)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 21)) +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 23)) + +): Unwrap; +>Unwrap : Symbol(Unwrap, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 81, 35)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 21)) +>K : Symbol(K, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 84, 23)) + +class Foo2 { +>Foo2 : Symbol(Foo2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 88, 16)) + + prop!: Wrapped; +>prop : Symbol(Foo2.prop, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 90, 12)) +>Wrapped : Symbol(Wrapped, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 79, 1)) + + method() { +>method : Symbol(Foo2.method, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 91, 25)) + + set(this, "prop", "hi"); // <-- type error +>set : Symbol(set, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 52)) +>this : Symbol(Foo2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 88, 16)) + } +} + +set(new Foo2(), "prop", "hi"); // <-- typechecks +>set : Symbol(set, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 82, 52)) +>Foo2 : Symbol(Foo2, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 88, 16)) + +type InferBecauseWhyNot = [T] extends [(p: infer P1) => any] +>InferBecauseWhyNot : Symbol(InferBecauseWhyNot, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 98, 30)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 100, 24)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 100, 24)) +>p : Symbol(p, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 100, 43)) +>P1 : Symbol(P1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 100, 51)) + + ? P1 | T +>P1 : Symbol(P1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 100, 51)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 100, 24)) + + : never; + +function f3 any>(x: Q): InferBecauseWhyNot { +>f3 : Symbol(f3, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 102, 10)) +>Q : Symbol(Q, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 104, 12)) +>arg : Symbol(arg, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 104, 23)) +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 104, 41)) +>Q : Symbol(Q, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 104, 12)) +>InferBecauseWhyNot : Symbol(InferBecauseWhyNot, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 98, 30)) +>Q : Symbol(Q, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 104, 12)) + + return x; +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 104, 41)) +} + +type InferBecauseWhyNotDistributive = T extends (p: infer P1) => any +>InferBecauseWhyNotDistributive : Symbol(InferBecauseWhyNotDistributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 106, 1)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 108, 36)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 108, 36)) +>p : Symbol(p, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 108, 52)) +>P1 : Symbol(P1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 108, 60)) + + ? P1 | T +>P1 : Symbol(P1, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 108, 60)) +>T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 108, 36)) + + : never; + +function f4 any>( +>f4 : Symbol(f4, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 110, 10)) +>Q : Symbol(Q, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 112, 12)) +>arg : Symbol(arg, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 112, 23)) + + x: Q +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 112, 41)) +>Q : Symbol(Q, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 112, 12)) + +): InferBecauseWhyNotDistributive { +>InferBecauseWhyNotDistributive : Symbol(InferBecauseWhyNotDistributive, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 106, 1)) +>Q : Symbol(Q, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 112, 12)) + + return x; // should fail +>x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 112, 41)) +} + diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types new file mode 100644 index 0000000000000..154a5472037ad --- /dev/null +++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types @@ -0,0 +1,313 @@ +=== tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts === +export type FilterPropsByType = { +>FilterPropsByType : FilterPropsByType + + [K in keyof T]: T[K] extends TT ? K : never +}[keyof T]; + +function select< +>select : >(property: T, list: TList[], valueProp: TValueProp) => void + + T extends string | number, + TList extends object, + TValueProp extends FilterPropsByType +>(property: T, list: TList[], valueProp: TValueProp) {} +>property : T +>list : TList[] +>valueProp : TValueProp + +export function func(x: XX, tipos: { value: XX }[]) { +>func : (x: XX, tipos: { value: XX;}[]) => void +>x : XX +>tipos : { value: XX; }[] +>value : XX + + select(x, tipos, "value"); +>select(x, tipos, "value") : void +>select : >(property: T, list: TList[], valueProp: TValueProp) => void +>x : XX +>tipos : { value: XX; }[] +>"value" : "value" +} + +declare function onlyNullablePlease( +>onlyNullablePlease : (value: T) => void +>null : null + + value: T +>value : T + +): void; + +declare function onlyNullablePlease2< +>onlyNullablePlease2 : (value: T) => void + + T extends [null] extends [T] ? any : never +>null : null + +>(value: T): void; +>value : T + +declare var z: string | null; +>z : string | null +>null : null + +onlyNullablePlease(z); // works as expected +>onlyNullablePlease(z) : void +>onlyNullablePlease : (value: T) => void +>z : string | null + +onlyNullablePlease2(z); // works as expected +>onlyNullablePlease2(z) : void +>onlyNullablePlease2 : (value: T) => void +>z : string | null + +declare var y: string; +>y : string + +onlyNullablePlease(y); // error as expected +>onlyNullablePlease(y) : void +>onlyNullablePlease : (value: T) => void +>y : string + +onlyNullablePlease2(y); // error as expected +>onlyNullablePlease2(y) : void +>onlyNullablePlease2 : (value: T) => void +>y : string + +function f(t: T) { +>f : (t: T) => void +>t : T + + var x: T | null = Math.random() > 0.5 ? null : t; +>x : T | null +>null : null +>Math.random() > 0.5 ? null : t : T | null +>Math.random() > 0.5 : boolean +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0.5 : 0.5 +>null : null +>t : T + + onlyNullablePlease(x); // should work +>onlyNullablePlease(x) : void +>onlyNullablePlease : (value: T) => void +>x : T | null + + onlyNullablePlease2(x); // should work +>onlyNullablePlease2(x) : void +>onlyNullablePlease2 : (value: T) => void +>x : T | null +} + +function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) { +>f2 : (t1: { x: T; y: T;}, t2: T extends T ? { x: T; y: T;} : never) => void +>t1 : { x: T; y: T; } +>x : T +>y : T +>t2 : T extends T ? { x: T; y: T; } : never +>x : T +>y : T + + t1 = t2; // OK +>t1 = t2 : T extends T ? { x: T; y: T; } : never +>t1 : { x: T; y: T; } +>t2 : T extends T ? { x: T; y: T; } : never + + t2 = t1; // should fail +>t2 = t1 : { x: T; y: T; } +>t2 : T extends T ? { x: T; y: T; } : never +>t1 : { x: T; y: T; } +} + +type Foo = T extends true ? string : "a"; +>Foo : Foo +>true : true + +function test(x: Foo, s: string) { +>test : (x: Foo, s: string) => void +>x : Foo +>s : string + + x = "a"; // Currently an error, should be ok +>x = "a" : "a" +>x : Foo +>"a" : "a" + + x = s; // Error +>x = s : string +>x : Foo +>s : string +} + +// #26933 +type Distributive = T extends { a: number } ? { a: number } : { b: number }; +>Distributive : Distributive +>a : number +>a : number +>b : number + +function testAssignabilityToConditionalType() { +>testAssignabilityToConditionalType : () => void + + const o = { a: 1, b: 2 }; +>o : { a: number; b: number; } +>{ a: 1, b: 2 } : { a: number; b: number; } +>a : number +>1 : 1 +>b : number +>2 : 2 + + const x: [T] extends [string] +>x : [T] extends [string] ? { y: number; } : { a: number; b: number; } + + ? { y: number } +>y : number + + : { a: number; b: number } = undefined!; +>a : number +>b : number +>undefined! : never +>undefined : undefined + + // Simple case: OK + const o1: [T] extends [number] ? { a: number } : { b: number } = o; +>o1 : [T] extends [number] ? { a: number; } : { b: number; } +>a : number +>b : number +>o : { a: number; b: number; } + + // Simple case where source happens to be a conditional type: also OK + const x1: [T] extends [number] +>x1 : [T] extends [number] ? [T] extends [string] ? { y: number; } : { a: number; } : [T] extends [string] ? { y: number; } : { b: number; } + + ? ([T] extends [string] ? { y: number } : { a: number }) +>y : number +>a : number + + : ([T] extends [string] ? { y: number } : { b: number }) = x; +>y : number +>b : number +>x : [T] extends [string] ? { y: number; } : { a: number; b: number; } + + // Infer type parameters: no good + const o2: [T] extends [[infer U]] ? U : { b: number } = o; +>o2 : [T] extends [[infer U]] ? U : { b: number; } +>b : number +>o : { a: number; b: number; } + + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. + // There's an argument for the result of dumping `never` into a distributive conditional + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + + // Distributive where T might instantiate to never: no good + const o3: Distributive = o; +>o3 : Distributive +>o : { a: number; b: number; } + + // Distributive where T & string might instantiate to never: also no good + const o4: Distributive = o; +>o4 : Distributive +>o : { a: number; b: number; } + + // Distributive where {a: T} cannot instantiate to never: OK + const o5: Distributive<{ a: T }> = o; +>o5 : Distributive<{ a: T; }> +>a : T +>o : { a: number; b: number; } + + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good + const o6: Distributive<[T] extends [never] ? { a: number } : never> = o; +>o6 : Distributive<[T] extends [never] ? { a: number; } : never> +>a : number +>o : { a: number; b: number; } +} + +type Wrapped = { ___secret: T }; +>Wrapped : Wrapped +>___secret : T + +type Unwrap = T extends Wrapped ? U : T; +>Unwrap : Unwrap + +declare function set( +>set : (obj: T, key: K, value: Unwrap) => Unwrap + + obj: T, +>obj : T + + key: K, +>key : K + + value: Unwrap +>value : Unwrap + +): Unwrap; + +class Foo2 { +>Foo2 : Foo2 + + prop!: Wrapped; +>prop : Wrapped + + method() { +>method : () => void + + set(this, "prop", "hi"); // <-- type error +>set(this, "prop", "hi") : Unwrap +>set : (obj: T, key: K, value: Unwrap) => Unwrap +>this : this +>"prop" : "prop" +>"hi" : "hi" + } +} + +set(new Foo2(), "prop", "hi"); // <-- typechecks +>set(new Foo2(), "prop", "hi") : string +>set : (obj: T, key: K, value: Unwrap) => Unwrap +>new Foo2() : Foo2 +>Foo2 : typeof Foo2 +>"prop" : "prop" +>"hi" : "hi" + +type InferBecauseWhyNot = [T] extends [(p: infer P1) => any] +>InferBecauseWhyNot : InferBecauseWhyNot +>p : P1 + + ? P1 | T + : never; + +function f3 any>(x: Q): InferBecauseWhyNot { +>f3 : any>(x: Q) => InferBecauseWhyNot +>arg : any +>x : Q + + return x; +>x : Q +} + +type InferBecauseWhyNotDistributive = T extends (p: infer P1) => any +>InferBecauseWhyNotDistributive : InferBecauseWhyNotDistributive +>p : P1 + + ? P1 | T + : never; + +function f4 any>( +>f4 : any>(x: Q) => InferBecauseWhyNotDistributive +>arg : any + + x: Q +>x : Q + +): InferBecauseWhyNotDistributive { + return x; // should fail +>x : Q +} + diff --git a/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.js b/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.js new file mode 100644 index 0000000000000..e2334e631b206 --- /dev/null +++ b/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.js @@ -0,0 +1,9 @@ +//// [conditionalTypeSubclassExtendsTypeParam.ts] +declare class Model { + public getField2(): Field +} + +declare class Field { +} + +//// [conditionalTypeSubclassExtendsTypeParam.js] diff --git a/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.symbols b/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.symbols new file mode 100644 index 0000000000000..a2c25631171dd --- /dev/null +++ b/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.symbols @@ -0,0 +1,28 @@ +=== tests/cases/compiler/conditionalTypeSubclassExtendsTypeParam.ts === +declare class Model { +>Model : Symbol(Model, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 0)) +>M : Symbol(M, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 20)) +>MR : Symbol(MR, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 33)) +>MR : Symbol(MR, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 33)) + + public getField2(): Field +>getField2 : Symbol(Model.getField2, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 50)) +>K : Symbol(K, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 1, 21)) +>M : Symbol(M, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 20)) +>Field : Symbol(Field, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 2, 1)) +>M : Symbol(M, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 20)) +>K : Symbol(K, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 1, 21)) +>K : Symbol(K, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 1, 21)) +>MR : Symbol(MR, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 33)) +>MR : Symbol(MR, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 33)) +>K : Symbol(K, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 1, 21)) +>M : Symbol(M, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 0, 20)) +>K : Symbol(K, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 1, 21)) +} + +declare class Field { +>Field : Symbol(Field, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 2, 1)) +>T : Symbol(T, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 4, 20)) +>TR : Symbol(TR, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 4, 33)) +>TR : Symbol(TR, Decl(conditionalTypeSubclassExtendsTypeParam.ts, 4, 33)) +} diff --git a/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.types b/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.types new file mode 100644 index 0000000000000..63a3834c2a364 --- /dev/null +++ b/tests/baselines/reference/conditionalTypeSubclassExtendsTypeParam.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/conditionalTypeSubclassExtendsTypeParam.ts === +declare class Model { +>Model : Model + + public getField2(): Field +>getField2 : () => Field +} + +declare class Field { +>Field : Field +} diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.js b/tests/baselines/reference/ramdaToolsNoInfinite2.js new file mode 100644 index 0000000000000..17fa33c10d3f3 --- /dev/null +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.js @@ -0,0 +1,572 @@ +//// [ramdaToolsNoInfinite2.ts] +declare module "Any/Kind" { + import { Extends } from "Any/Extends"; + import { List } from "List/List"; + + export type Kind = Extends extends 1 ? 'function' : Extends extends 1 ? 'array' : Extends extends 1 ? 'object' : Extends extends 1 ? 'string' : Extends extends 1 ? 'number' : Extends extends 1 ? 'boolean' : 'unknown'; +} +declare module "Any/Compute" { + export type Compute = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; +} +declare module "Object/Pick" { + import { Key } from "Any/Key"; + + type __Pick = { + [P in K]: O[P]; + } & {}; + + export type _Pick = __Pick; + + export type Pick = O extends unknown ? _Pick : never; +} +declare module "Object/Keys" { + import { Keys as UKeys } from "Union/Keys"; + + export type Keys = UKeys; +} +declare module "Object/Omit" { + import { _Pick } from "Object/Pick"; + import { Exclude } from "Union/Exclude"; + import { Key } from "Any/Key"; + import { Keys } from "Object/Keys"; + export type _Omit = _Pick, K>>; + + export type Omit = O extends unknown ? _Omit : never; +} +declare module "Object/At" { + import { Key } from "Any/Key"; + import { Boolean } from "Boolean/Boolean"; + + type AtStrict = [K & keyof O] extends [never] ? never : O[K & keyof O]; + + type AtLoose = O extends unknown ? AtStrict : never; + + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; +} +declare module "Boolean/Boolean" { + export type Boolean = True | False; + + export type True = 1; + + export type False = 0; +} +declare module "Boolean/Not" { + import { Boolean } from "Boolean/Boolean"; + + export type Not = { + 0: 1; + 1: 0; + }[B]; +} +declare module "Union/Has" { + import { Union } from "Union/Union"; + import { Not } from "Boolean/Not"; + import { Extends } from "Any/Extends"; + + export type Has = Not, U1>>; +} +declare module "Union/Union" { + export type Union = any; +} +declare module "Union/Exclude" { + import { Union } from "Union/Union"; + + export type Exclude = U extends M ? never : U; +} +declare module "Any/_Internal" { + import { _NumberOf } from "Number/NumberOf"; + + export type Match = 'default' | 'implements->' | '<-implements' | 'extends->' | '<-extends' | 'equals'; + + export type NumberOf = N extends number ? _NumberOf : N; +} +declare module "Any/Implements" { + import { Extends } from "Any/Extends"; + + export type Implements = Extends extends 1 ? 1 : 0; +} +declare module "Any/Key" { + export type Key = string | number | symbol; +} +declare module "Union/Keys" { + import { Union } from "Union/Union"; + import { Key } from "Any/Key"; + + export type Keys = (U extends unknown ? keyof U : never) & Key; +} +declare module "List/ObjectOf" { + import { _Omit } from "Object/Omit"; + import { Has } from "Union/Has"; + import { At } from "Object/At"; + import { List } from "List/List"; + + export type _ObjectOf = Has extends 1 ? number extends At ? _Omit> : _Omit : L; + + export type ObjectOf = L extends unknown ? _ObjectOf : never; +} +declare module "List/Keys" { + import { Exclude } from "Union/Exclude"; + import { List } from "List/List"; + import { Keys as UKeys } from "Union/Keys"; + + export type Keys = Exclude, keyof any[]> | number; +} +declare module "Object/Merge" { + import { _Omit } from "Object/Omit"; + import { At } from "Object/At"; + import { Compute } from "Any/Compute"; + import { Depth } from "Object/_Internal"; + import { Kind } from "Any/Kind"; + + export type MergeFlat = Compute>; + + export type MergeDeep = (Kind<(O | O1)> extends 'object' ? MergeFlat extends infer M ? { + [K in keyof M]: MergeDeep>; + } & {} : never : O); + + export type Merge = { + 'flat': MergeFlat; + 'deep': MergeDeep; + }[depth]; +} +declare module "Union/NonNullable" { + import { Exclude } from "Union/Exclude"; + import { Union } from "Union/Union"; + + export type NonNullable = Exclude; +} +declare module "Object/ListOf" { + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Cast } from "Any/Cast"; + import { Key } from "Iteration/Key"; + import { Next } from "Iteration/Next"; + import { _Append } from "List/Append"; + import { Exclude } from "Union/Exclude"; + import { List } from "List/List"; + import { Extends } from "Any/Extends"; + + type PickIfEntry = Key extends keyof O ? _Append, keyof O>]> : LN; + + type __ListOf> = { + 0: __ListOf>, PickIfEntry, Next>; + 1: LN; + }[Extends<[K], [never]>]; + + export type _ListOf = __ListOf extends infer X ? Cast : never; + + export type ListOf = O extends unknown ? _ListOf : never; +} +declare module "Object/NonNullable" { + import { MergeFlat } from "Object/Merge"; + import { NonNullable as UNonNullable } from "Union/NonNullable"; + import { Depth } from "Object/_Internal"; + import { Pick } from "Object/Pick"; + import { Key } from "Any/Key"; + import { Implements } from "Any/Implements"; + import { Keys } from "Object/Keys"; + + export type NonNullableFlat = { + [K in keyof O]: UNonNullable; + } & {}; + + export type NonNullableDeep = { + [K in keyof O]: NonNullableDeep>; + }; + + type NonNullablePart = { + 'flat': NonNullableFlat; + 'deep': NonNullableDeep; + }[depth]; + + export type NonNullable = { + 1: NonNullablePart; + 0: MergeFlat, depth>, O>; + }[Implements, K>] & {}; +} +declare module "Object/Overwrite" { + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; +} +declare module "Number/_Internal" { + import { IterationMap } from "Iteration/IterationOf"; + import { Format } from "Iteration/Format"; + + export type Formats = 'b' | 'n' | 's'; + + type KnownIterationMapKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; + + type PositiveIterationKeys = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; + + type NegativeIterationKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1'; + + export type Numbers = { + 'string': { + 'all': Format; + '+': Format; + '-': Format; + '0': Format; + }; + 'number': { + 'all': Format; + '+': Format; + '-': Format; + '0': Format; + }; + }; +} +declare module "Number/Number" { + export type Number = string; +} +declare module "Iteration/_Internal" { + export type Formats = 'n' | 's'; + export type Way = '->' | '<-'; +} +declare module "List/Prepend" { + import { List } from "List/List"; + + export type Prepend = ((head: A, ...args: L) => any) extends ((...args: infer U) => any) ? U : L; +} +declare module "List/_Internal" { + import { Overwrite } from "Object/Overwrite"; + import { List } from "List/List"; + + export type Naked = Overwrite, L>; +} +declare module "List/Tail" { + import { List } from "List/List"; + + export type Tail = ((...t: L) => any) extends ((head: any, ...tail: infer LTail) => any) ? LTail : never; +} +declare module "Iteration/Format" { + import { Iteration } from "Iteration/Iteration"; + import { Formats } from "Iteration/_Internal"; + + export type Format = { + 's': I[2]; + 'n': I[3]; + }[fmt]; +} +declare module "Iteration/Pos" { + import { Iteration } from "Iteration/Iteration"; + import { Format } from "Iteration/Format"; + + export type Pos = Format; +} +declare module "List/Append" { + import { _Concat } from "List/Concat"; + import { List } from "List/List"; + + export type _Append = _Concat; + + export type Append = L extends unknown ? A extends unknown ? _Append : never : never; +} +declare module "List/Reverse" { + import { Prepend } from "List/Prepend"; + import { Pos } from "Iteration/Pos"; + import { Next } from "Iteration/Next"; + import { Length } from "List/Length"; + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Cast } from "Any/Cast"; + import { List } from "List/List"; + import { Naked } from "List/_Internal"; + import { Extends } from "Any/Extends"; + + type __Reverse> = { + 0: __Reverse]>, Next>; + 1: LO; + }[Extends, Length>]; + + export type _Reverse = __Reverse, LO> extends infer X ? Cast : never; + + export type Reverse = L extends unknown ? LO extends unknown ? _Reverse : never : never; +} +declare module "List/Concat" { + import { _Reverse } from "List/Reverse"; + import { List } from "List/List"; + + export type _Concat = _Reverse<_Reverse, L1>; + + export type Concat = L extends unknown ? L1 extends L1 ? _Concat : never : never; +} +declare module "List/Drop" { + import { Tail } from "List/Tail"; + import { Cast } from "Any/Cast"; + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Number } from "Number/Number"; + import { Way } from "Iteration/_Internal"; + import { List } from "List/List"; + import { Pos } from "Iteration/Pos"; + import { Prev } from "Iteration/Prev"; + import { Prepend } from "List/Prepend"; + import { Naked } from "List/_Internal"; + import { Extends } from "Any/Extends"; + + type DropForth = { + 0: DropForth, Prev>; + 1: L; + }[Extends<0, Pos>]; + + type DropBack, LN extends List = []> = { + 0: DropBack, Prepend]>>; + 1: LN; + }[Extends<-1, Pos>]; + + type __Drop = { + '->': DropForth; + '<-': DropBack; + }[way]; + + export type _Drop = __Drop, IterationOf, way> extends infer X ? Cast : never; + + export type Drop = L extends unknown ? N extends unknown ? _Drop : never : never; +} +declare module "List/Length" { + import { NumberOf } from "Number/NumberOf"; + import { Formats } from "Iteration/_Internal"; + import { List } from "List/List"; + + export type Length = { + 's': NumberOf; + 'n': L['length']; + }[fmt]; +} +declare module "Iteration/Next" { + import { IterationMap } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + + export type Next = IterationMap[I[1]]; +} +declare module "Any/Cast" { + export type Cast = A1 extends A2 ? A1 : A2; +} +declare module "Function/Parameters" { + import { Function } from "Function/Function"; + + export type Parameters = F extends ((...args: infer L) => any) ? L : never; +} +declare module "Function/Return" { + import { Function } from "Function/Function"; + + export type Return = F extends ((...args: any[]) => infer R) ? R : never; +} +declare module "Iteration/Prev" { + import { IterationMap } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + + export type Prev = IterationMap[I[0]]; +} +declare module "Number/NumberOf" { + import { IterationMap } from "Iteration/IterationOf"; + import { Key } from "Iteration/Key"; + import { Pos } from "Iteration/Pos"; + import { Numbers } from "Number/_Internal"; + + export type _NumberOf = { + [K in keyof IterationMap]: Pos extends N ? Key : never; + }[keyof IterationMap]; + + export type NumberOf = N extends Numbers['number']['all'] ? _NumberOf : string; +} +declare module "Object/_Internal" { + export type Modx = ['?' | '!', 'W' | 'R']; + + export type Depth = 'flat' | 'deep'; + + export type Empty = { + [K in keyof O]: undefined; + }; +} +declare module "Iteration/IterationOf" { + import { Number } from "Number/Number"; + + export type IterationMap = { + '-40': ['__', '-39', '-40', -40, '-']; + '-39': ['-40', '-38', '-39', -39, '-']; + '-38': ['-39', '-37', '-38', -38, '-']; + '-37': ['-38', '-36', '-37', -37, '-']; + '-36': ['-37', '-35', '-36', -36, '-']; + '-35': ['-36', '-34', '-35', -35, '-']; + '-34': ['-35', '-33', '-34', -34, '-']; + '-33': ['-34', '-32', '-33', -33, '-']; + '-32': ['-33', '-31', '-32', -32, '-']; + '-31': ['-32', '-30', '-31', -31, '-']; + '-30': ['-31', '-29', '-30', -30, '-']; + '-29': ['-30', '-28', '-29', -29, '-']; + '-28': ['-29', '-27', '-28', -28, '-']; + '-27': ['-28', '-26', '-27', -27, '-']; + '-26': ['-27', '-25', '-26', -26, '-']; + '-25': ['-26', '-24', '-25', -25, '-']; + '-24': ['-25', '-23', '-24', -24, '-']; + '-23': ['-24', '-22', '-23', -23, '-']; + '-22': ['-23', '-21', '-22', -22, '-']; + '-21': ['-22', '-20', '-21', -21, '-']; + '-20': ['-21', '-19', '-20', -20, '-']; + '-19': ['-20', '-18', '-19', -19, '-']; + '-18': ['-19', '-17', '-18', -18, '-']; + '-17': ['-18', '-16', '-17', -17, '-']; + '-16': ['-17', '-15', '-16', -16, '-']; + '-15': ['-16', '-14', '-15', -15, '-']; + '-14': ['-15', '-13', '-14', -14, '-']; + '-13': ['-14', '-12', '-13', -13, '-']; + '-12': ['-13', '-11', '-12', -12, '-']; + '-11': ['-12', '-10', '-11', -11, '-']; + '-10': ['-11', '-9', '-10', -10, '-']; + '-9': ['-10', '-8', '-9', -9, '-']; + '-8': ['-9', '-7', '-8', -8, '-']; + '-7': ['-8', '-6', '-7', -7, '-']; + '-6': ['-7', '-5', '-6', -6, '-']; + '-5': ['-6', '-4', '-5', -5, '-']; + '-4': ['-5', '-3', '-4', -4, '-']; + '-3': ['-4', '-2', '-3', -3, '-']; + '-2': ['-3', '-1', '-2', -2, '-']; + '-1': ['-2', '0', '-1', -1, '-']; + '0': ['-1', '1', '0', 0, '0']; + '1': ['0', '2', '1', 1, '+']; + '2': ['1', '3', '2', 2, '+']; + '3': ['2', '4', '3', 3, '+']; + '4': ['3', '5', '4', 4, '+']; + '5': ['4', '6', '5', 5, '+']; + '6': ['5', '7', '6', 6, '+']; + '7': ['6', '8', '7', 7, '+']; + '8': ['7', '9', '8', 8, '+']; + '9': ['8', '10', '9', 9, '+']; + '10': ['9', '11', '10', 10, '+']; + '11': ['10', '12', '11', 11, '+']; + '12': ['11', '13', '12', 12, '+']; + '13': ['12', '14', '13', 13, '+']; + '14': ['13', '15', '14', 14, '+']; + '15': ['14', '16', '15', 15, '+']; + '16': ['15', '17', '16', 16, '+']; + '17': ['16', '18', '17', 17, '+']; + '18': ['17', '19', '18', 18, '+']; + '19': ['18', '20', '19', 19, '+']; + '20': ['19', '21', '20', 20, '+']; + '21': ['20', '22', '21', 21, '+']; + '22': ['21', '23', '22', 22, '+']; + '23': ['22', '24', '23', 23, '+']; + '24': ['23', '25', '24', 24, '+']; + '25': ['24', '26', '25', 25, '+']; + '26': ['25', '27', '26', 26, '+']; + '27': ['26', '28', '27', 27, '+']; + '28': ['27', '29', '28', 28, '+']; + '29': ['28', '30', '29', 29, '+']; + '30': ['29', '31', '30', 30, '+']; + '31': ['30', '32', '31', 31, '+']; + '32': ['31', '33', '32', 32, '+']; + '33': ['32', '34', '33', 33, '+']; + '34': ['33', '35', '34', 34, '+']; + '35': ['34', '36', '35', 35, '+']; + '36': ['35', '37', '36', 36, '+']; + '37': ['36', '38', '37', 37, '+']; + '38': ['37', '39', '38', 38, '+']; + '39': ['38', '40', '39', 39, '+']; + '40': ['39', '__', '40', 40, '+']; + '__': ['__', '__', string, number, '-' | '0' | '+']; + }; + + export type IterationOf = N extends keyof IterationMap ? IterationMap[N] : IterationMap['__']; +} +declare module "Iteration/Iteration" { + import { IterationMap } from "Iteration/IterationOf"; + + export type Iteration = [keyof IterationMap, keyof IterationMap, string, number, '-' | '0' | '+']; +} +declare module "Iteration/Key" { + import { Iteration } from "Iteration/Iteration"; + import { Format } from "Iteration/Format"; + + export type Key = Format; +} +declare module "List/NonNullable" { + import { Depth } from "Object/_Internal"; + import { NonNullable as ONonNullable } from "Object/NonNullable"; + import { ListOf } from "Object/ListOf"; + import { Cast } from "Any/Cast"; + import { Key } from "Any/Key"; + import { ObjectOf } from "List/ObjectOf"; + import { Implements } from "Any/Implements"; + import { Keys } from "List/Keys"; + import { List } from "List/List"; + import { NumberOf } from "Any/_Internal"; + + export type NonNullable = { + 1: Cast, List>; + 0: ListOf, NumberOf, depth>>; + }[Implements, K>] & {}; +} +declare module "Any/Type" { + const symbol: unique symbol; + + export type Type = A & { + [K in typeof symbol]: Id; + }; +} +declare module "Any/x" { + import { Type } from "Any/Type"; + + export type x = Type<{}, 'x'>; +} +declare module "List/List" { + + export type List = ReadonlyArray; +} +declare module "Function/Function" { + import { List } from "List/List"; + + export interface Function

{ + (...args: P): R; + } +} +declare module "Any/Extends" { + export type Extends = [A1] extends [never] ? 0 : A1 extends A2 ? 1 : 0; +} + +declare module "Function/Curry" { + import { Pos } from "Iteration/Pos"; + import { _Append } from "List/Append"; + import { _Concat } from "List/Concat"; + import { _Drop } from "List/Drop"; + import { Length } from "List/Length"; + import { Next } from "Iteration/Next"; + import { Cast } from "Any/Cast"; + import { Parameters } from "Function/Parameters"; + import { Return } from "Function/Return"; + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Key } from "Iteration/Key"; + import { NonNullable } from "List/NonNullable"; + import { x } from "Any/x"; + import { List } from "List/List"; + import { Function } from "Function/Function"; + import { Extends } from "Any/Extends"; + + type GapOf> = L1[Pos] extends x ? _Append]> : LN; + + type _GapsOf> = { + 0: _GapsOf, Next>; + 1: _Concat>>; + }[Extends, Length>]; + + type GapsOf = _GapsOf extends infer X ? Cast : never; + + type Gaps = NonNullable<{ + [K in keyof L]?: L[K] | x; + }>; + + export type Curry = (...args: Cast>>) => GapsOf> extends infer G ? Length> extends infer L ? L extends 0 ? Return : L extends 1 ? Curry<(...args: Cast) => Return> & ((...args: Cast) => Return) : Curry<(...args: Cast) => Return> : never : never; +} + + + + +//// [ramdaToolsNoInfinite2.js] +"use strict"; diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.symbols b/tests/baselines/reference/ramdaToolsNoInfinite2.symbols new file mode 100644 index 0000000000000..c0a34baea3fb5 --- /dev/null +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.symbols @@ -0,0 +1,1992 @@ +=== tests/cases/compiler/ramdaToolsNoInfinite2.ts === +declare module "Any/Kind" { +>"Any/Kind" : Symbol("Any/Kind", Decl(ramdaToolsNoInfinite2.ts, 0, 0)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 2, 12)) + + export type Kind = Extends extends 1 ? 'function' : Extends extends 1 ? 'array' : Extends extends 1 ? 'object' : Extends extends 1 ? 'string' : Extends extends 1 ? 'number' : Extends extends 1 ? 'boolean' : 'unknown'; +>Kind : Symbol(Kind, Decl(ramdaToolsNoInfinite2.ts, 2, 37)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 2, 12)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 1, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 4, 21)) +} +declare module "Any/Compute" { +>"Any/Compute" : Symbol("Any/Compute", Decl(ramdaToolsNoInfinite2.ts, 5, 1)) + + export type Compute = A extends Function ? A : { +>Compute : Symbol(Compute, Decl(ramdaToolsNoInfinite2.ts, 6, 30)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 7, 24)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 7, 24)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 7, 24)) + + [K in keyof A]: A[K]; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 8, 9)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 7, 24)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 7, 24)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 8, 9)) + + } & {}; +} +declare module "Object/Pick" { +>"Object/Pick" : Symbol("Object/Pick", Decl(ramdaToolsNoInfinite2.ts, 10, 1)) + + import { Key } from "Any/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 12, 12)) + + type __Pick = { +>__Pick : Symbol(__Pick, Decl(ramdaToolsNoInfinite2.ts, 12, 34)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 14, 16)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 14, 33)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 14, 16)) + + [P in K]: O[P]; +>P : Symbol(P, Decl(ramdaToolsNoInfinite2.ts, 15, 9)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 14, 33)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 14, 16)) +>P : Symbol(P, Decl(ramdaToolsNoInfinite2.ts, 15, 9)) + + } & {}; + + export type _Pick = __Pick; +>_Pick : Symbol(_Pick, Decl(ramdaToolsNoInfinite2.ts, 16, 11)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 18, 22)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 18, 39)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 12, 12)) +>__Pick : Symbol(__Pick, Decl(ramdaToolsNoInfinite2.ts, 12, 34)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 18, 22)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 18, 22)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 18, 39)) + + export type Pick = O extends unknown ? _Pick : never; +>Pick : Symbol(Pick, Decl(ramdaToolsNoInfinite2.ts, 18, 80)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 20, 21)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 20, 38)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 12, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 20, 21)) +>_Pick : Symbol(_Pick, Decl(ramdaToolsNoInfinite2.ts, 16, 11)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 20, 21)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 20, 38)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 20, 21)) +} +declare module "Object/Keys" { +>"Object/Keys" : Symbol("Object/Keys", Decl(ramdaToolsNoInfinite2.ts, 21, 1)) + + import { Keys as UKeys } from "Union/Keys"; +>Keys : Symbol(UKeys, Decl(ramdaToolsNoInfinite2.ts, 96, 34)) +>UKeys : Symbol(UKeys, Decl(ramdaToolsNoInfinite2.ts, 23, 12)) + + export type Keys = UKeys; +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 23, 47)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 25, 21)) +>UKeys : Symbol(UKeys, Decl(ramdaToolsNoInfinite2.ts, 23, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 25, 21)) +} +declare module "Object/Omit" { +>"Object/Omit" : Symbol("Object/Omit", Decl(ramdaToolsNoInfinite2.ts, 26, 1)) + + import { _Pick } from "Object/Pick"; +>_Pick : Symbol(_Pick, Decl(ramdaToolsNoInfinite2.ts, 28, 12)) + + import { Exclude } from "Union/Exclude"; +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 29, 12)) + + import { Key } from "Any/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 30, 12)) + + import { Keys } from "Object/Keys"; +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 31, 12)) + + export type _Omit = _Pick, K>>; +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 31, 39)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 32, 22)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 32, 39)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 30, 12)) +>_Pick : Symbol(_Pick, Decl(ramdaToolsNoInfinite2.ts, 28, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 32, 22)) +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 29, 12)) +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 31, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 32, 22)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 32, 39)) + + export type Omit = O extends unknown ? _Omit : never; +>Omit : Symbol(Omit, Decl(ramdaToolsNoInfinite2.ts, 32, 87)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 34, 21)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 34, 38)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 30, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 34, 21)) +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 31, 39)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 34, 21)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 34, 38)) +} +declare module "Object/At" { +>"Object/At" : Symbol("Object/At", Decl(ramdaToolsNoInfinite2.ts, 35, 1)) + + import { Key } from "Any/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 37, 12)) + + import { Boolean } from "Boolean/Boolean"; +>Boolean : Symbol(Boolean, Decl(ramdaToolsNoInfinite2.ts, 38, 12)) + + type AtStrict = [K & keyof O] extends [never] ? never : O[K & keyof O]; +>AtStrict : Symbol(AtStrict, Decl(ramdaToolsNoInfinite2.ts, 38, 46)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 40, 18)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 40, 35)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 37, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 40, 35)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 40, 18)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 40, 18)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 40, 35)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 40, 18)) + + type AtLoose = O extends unknown ? AtStrict : never; +>AtLoose : Symbol(AtLoose, Decl(ramdaToolsNoInfinite2.ts, 40, 108)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 42, 17)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 42, 34)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 37, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 42, 17)) +>AtStrict : Symbol(AtStrict, Decl(ramdaToolsNoInfinite2.ts, 38, 46)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 42, 17)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 42, 34)) + + export type At = { +>At : Symbol(At, Decl(ramdaToolsNoInfinite2.ts, 42, 95)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 44, 19)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 44, 36)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 37, 12)) +>strict : Symbol(strict, Decl(ramdaToolsNoInfinite2.ts, 44, 51)) +>Boolean : Symbol(Boolean, Decl(ramdaToolsNoInfinite2.ts, 38, 12)) + + 1: AtStrict; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 44, 83)) +>AtStrict : Symbol(AtStrict, Decl(ramdaToolsNoInfinite2.ts, 38, 46)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 44, 19)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 44, 36)) + + 0: AtLoose; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 45, 26)) +>AtLoose : Symbol(AtLoose, Decl(ramdaToolsNoInfinite2.ts, 40, 108)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 44, 19)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 44, 36)) + + }[strict]; +>strict : Symbol(strict, Decl(ramdaToolsNoInfinite2.ts, 44, 51)) +} +declare module "Boolean/Boolean" { +>"Boolean/Boolean" : Symbol("Boolean/Boolean", Decl(ramdaToolsNoInfinite2.ts, 48, 1)) + + export type Boolean = True | False; +>Boolean : Symbol(Boolean, Decl(ramdaToolsNoInfinite2.ts, 49, 34)) +>True : Symbol(True, Decl(ramdaToolsNoInfinite2.ts, 50, 39)) +>False : Symbol(False, Decl(ramdaToolsNoInfinite2.ts, 52, 25)) + + export type True = 1; +>True : Symbol(True, Decl(ramdaToolsNoInfinite2.ts, 50, 39)) + + export type False = 0; +>False : Symbol(False, Decl(ramdaToolsNoInfinite2.ts, 52, 25)) +} +declare module "Boolean/Not" { +>"Boolean/Not" : Symbol("Boolean/Not", Decl(ramdaToolsNoInfinite2.ts, 55, 1)) + + import { Boolean } from "Boolean/Boolean"; +>Boolean : Symbol(Boolean, Decl(ramdaToolsNoInfinite2.ts, 57, 12)) + + export type Not = { +>Not : Symbol(Not, Decl(ramdaToolsNoInfinite2.ts, 57, 46)) +>B : Symbol(B, Decl(ramdaToolsNoInfinite2.ts, 59, 20)) +>Boolean : Symbol(Boolean, Decl(ramdaToolsNoInfinite2.ts, 57, 12)) + + 0: 1; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 59, 42)) + + 1: 0; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 60, 13)) + + }[B]; +>B : Symbol(B, Decl(ramdaToolsNoInfinite2.ts, 59, 20)) +} +declare module "Union/Has" { +>"Union/Has" : Symbol("Union/Has", Decl(ramdaToolsNoInfinite2.ts, 63, 1)) + + import { Union } from "Union/Union"; +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 65, 12)) + + import { Not } from "Boolean/Not"; +>Not : Symbol(Not, Decl(ramdaToolsNoInfinite2.ts, 66, 12)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 67, 12)) + + export type Has = Not, U1>>; +>Has : Symbol(Has, Decl(ramdaToolsNoInfinite2.ts, 67, 42)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 69, 20)) +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 65, 12)) +>U1 : Symbol(U1, Decl(ramdaToolsNoInfinite2.ts, 69, 36)) +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 65, 12)) +>Not : Symbol(Not, Decl(ramdaToolsNoInfinite2.ts, 66, 12)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 67, 12)) +>Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) +>U1 : Symbol(U1, Decl(ramdaToolsNoInfinite2.ts, 69, 36)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 69, 20)) +>U1 : Symbol(U1, Decl(ramdaToolsNoInfinite2.ts, 69, 36)) +} +declare module "Union/Union" { +>"Union/Union" : Symbol("Union/Union", Decl(ramdaToolsNoInfinite2.ts, 70, 1)) + + export type Union = any; +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 71, 30)) +} +declare module "Union/Exclude" { +>"Union/Exclude" : Symbol("Union/Exclude", Decl(ramdaToolsNoInfinite2.ts, 73, 1)) + + import { Union } from "Union/Union"; +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 75, 12)) + + export type Exclude = U extends M ? never : U; +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 75, 40)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 77, 24)) +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 75, 12)) +>M : Symbol(M, Decl(ramdaToolsNoInfinite2.ts, 77, 40)) +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 75, 12)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 77, 24)) +>M : Symbol(M, Decl(ramdaToolsNoInfinite2.ts, 77, 40)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 77, 24)) +} +declare module "Any/_Internal" { +>"Any/_Internal" : Symbol("Any/_Internal", Decl(ramdaToolsNoInfinite2.ts, 78, 1)) + + import { _NumberOf } from "Number/NumberOf"; +>_NumberOf : Symbol(_NumberOf, Decl(ramdaToolsNoInfinite2.ts, 80, 12)) + + export type Match = 'default' | 'implements->' | '<-implements' | 'extends->' | '<-extends' | 'equals'; +>Match : Symbol(Match, Decl(ramdaToolsNoInfinite2.ts, 80, 48)) + + export type NumberOf = N extends number ? _NumberOf : N; +>NumberOf : Symbol(NumberOf, Decl(ramdaToolsNoInfinite2.ts, 82, 107)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 84, 25)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 84, 25)) +>_NumberOf : Symbol(_NumberOf, Decl(ramdaToolsNoInfinite2.ts, 80, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 84, 25)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 84, 25)) +} +declare module "Any/Implements" { +>"Any/Implements" : Symbol("Any/Implements", Decl(ramdaToolsNoInfinite2.ts, 85, 1)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 87, 12)) + + export type Implements = Extends extends 1 ? 1 : 0; +>Implements : Symbol(Implements, Decl(ramdaToolsNoInfinite2.ts, 87, 42)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 89, 27)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 89, 42)) +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 87, 12)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 89, 27)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 89, 42)) +} +declare module "Any/Key" { +>"Any/Key" : Symbol("Any/Key", Decl(ramdaToolsNoInfinite2.ts, 90, 1)) + + export type Key = string | number | symbol; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 91, 26)) +} +declare module "Union/Keys" { +>"Union/Keys" : Symbol("Union/Keys", Decl(ramdaToolsNoInfinite2.ts, 93, 1)) + + import { Union } from "Union/Union"; +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 95, 12)) + + import { Key } from "Any/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 96, 12)) + + export type Keys = (U extends unknown ? keyof U : never) & Key; +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 96, 34)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 98, 21)) +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 95, 12)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 98, 21)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 98, 21)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 96, 12)) +} +declare module "List/ObjectOf" { +>"List/ObjectOf" : Symbol("List/ObjectOf", Decl(ramdaToolsNoInfinite2.ts, 99, 1)) + + import { _Omit } from "Object/Omit"; +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 101, 12)) + + import { Has } from "Union/Has"; +>Has : Symbol(Has, Decl(ramdaToolsNoInfinite2.ts, 102, 12)) + + import { At } from "Object/At"; +>At : Symbol(At, Decl(ramdaToolsNoInfinite2.ts, 103, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 104, 12)) + + export type _ObjectOf = Has extends 1 ? number extends At ? _Omit> : _Omit : L; +>_ObjectOf : Symbol(_ObjectOf, Decl(ramdaToolsNoInfinite2.ts, 104, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 106, 26)) +>Has : Symbol(Has, Decl(ramdaToolsNoInfinite2.ts, 102, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 106, 26)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 104, 12)) +>At : Symbol(At, Decl(ramdaToolsNoInfinite2.ts, 103, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 106, 26)) +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 101, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 106, 26)) +>Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 101, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 106, 26)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 106, 26)) + + export type ObjectOf = L extends unknown ? _ObjectOf : never; +>ObjectOf : Symbol(ObjectOf, Decl(ramdaToolsNoInfinite2.ts, 106, 183)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 108, 25)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 108, 25)) +>_ObjectOf : Symbol(_ObjectOf, Decl(ramdaToolsNoInfinite2.ts, 104, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 108, 25)) +} +declare module "List/Keys" { +>"List/Keys" : Symbol("List/Keys", Decl(ramdaToolsNoInfinite2.ts, 109, 1)) + + import { Exclude } from "Union/Exclude"; +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 111, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 112, 12)) + + import { Keys as UKeys } from "Union/Keys"; +>Keys : Symbol(UKeys, Decl(ramdaToolsNoInfinite2.ts, 96, 34)) +>UKeys : Symbol(UKeys, Decl(ramdaToolsNoInfinite2.ts, 113, 12)) + + export type Keys = Exclude, keyof any[]> | number; +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 113, 47)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 115, 21)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 112, 12)) +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 111, 12)) +>UKeys : Symbol(UKeys, Decl(ramdaToolsNoInfinite2.ts, 113, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 115, 21)) +} +declare module "Object/Merge" { +>"Object/Merge" : Symbol("Object/Merge", Decl(ramdaToolsNoInfinite2.ts, 116, 1)) + + import { _Omit } from "Object/Omit"; +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 118, 12)) + + import { At } from "Object/At"; +>At : Symbol(At, Decl(ramdaToolsNoInfinite2.ts, 119, 12)) + + import { Compute } from "Any/Compute"; +>Compute : Symbol(Compute, Decl(ramdaToolsNoInfinite2.ts, 120, 12)) + + import { Depth } from "Object/_Internal"; +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 121, 12)) + + import { Kind } from "Any/Kind"; +>Kind : Symbol(Kind, Decl(ramdaToolsNoInfinite2.ts, 122, 12)) + + export type MergeFlat = Compute>; +>MergeFlat : Symbol(MergeFlat, Decl(ramdaToolsNoInfinite2.ts, 122, 36)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 124, 26)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 124, 43)) +>Compute : Symbol(Compute, Decl(ramdaToolsNoInfinite2.ts, 120, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 124, 26)) +>_Omit : Symbol(_Omit, Decl(ramdaToolsNoInfinite2.ts, 118, 12)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 124, 43)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 124, 26)) + + export type MergeDeep = (Kind<(O | O1)> extends 'object' ? MergeFlat extends infer M ? { +>MergeDeep : Symbol(MergeDeep, Decl(ramdaToolsNoInfinite2.ts, 124, 97)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 126, 26)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 126, 28)) +>Kind : Symbol(Kind, Decl(ramdaToolsNoInfinite2.ts, 122, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 126, 26)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 126, 28)) +>MergeFlat : Symbol(MergeFlat, Decl(ramdaToolsNoInfinite2.ts, 122, 36)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 126, 26)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 126, 28)) +>M : Symbol(M, Decl(ramdaToolsNoInfinite2.ts, 126, 110)) + + [K in keyof M]: MergeDeep>; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 127, 9)) +>M : Symbol(M, Decl(ramdaToolsNoInfinite2.ts, 126, 110)) +>MergeDeep : Symbol(MergeDeep, Decl(ramdaToolsNoInfinite2.ts, 124, 97)) +>M : Symbol(M, Decl(ramdaToolsNoInfinite2.ts, 126, 110)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 127, 9)) +>At : Symbol(At, Decl(ramdaToolsNoInfinite2.ts, 119, 12)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 126, 28)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 127, 9)) + + } & {} : never : O); +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 126, 26)) + + export type Merge = { +>Merge : Symbol(Merge, Decl(ramdaToolsNoInfinite2.ts, 128, 24)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 130, 22)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 130, 39)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 130, 58)) +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 121, 12)) + + 'flat': MergeFlat; +>'flat' : Symbol('flat', Decl(ramdaToolsNoInfinite2.ts, 130, 92)) +>MergeFlat : Symbol(MergeFlat, Decl(ramdaToolsNoInfinite2.ts, 122, 36)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 130, 22)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 130, 39)) + + 'deep': MergeDeep; +>'deep' : Symbol('deep', Decl(ramdaToolsNoInfinite2.ts, 131, 33)) +>MergeDeep : Symbol(MergeDeep, Decl(ramdaToolsNoInfinite2.ts, 124, 97)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 130, 22)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 130, 39)) + + }[depth]; +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 130, 58)) +} +declare module "Union/NonNullable" { +>"Union/NonNullable" : Symbol("Union/NonNullable", Decl(ramdaToolsNoInfinite2.ts, 134, 1)) + + import { Exclude } from "Union/Exclude"; +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 136, 12)) + + import { Union } from "Union/Union"; +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 137, 12)) + + export type NonNullable = Exclude; +>NonNullable : Symbol(NonNullable, Decl(ramdaToolsNoInfinite2.ts, 137, 40)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 139, 28)) +>Union : Symbol(Union, Decl(ramdaToolsNoInfinite2.ts, 137, 12)) +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 136, 12)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 139, 28)) +} +declare module "Object/ListOf" { +>"Object/ListOf" : Symbol("Object/ListOf", Decl(ramdaToolsNoInfinite2.ts, 140, 1)) + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 142, 12)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 143, 12)) + + import { Cast } from "Any/Cast"; +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 144, 12)) + + import { Key } from "Iteration/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 145, 12)) + + import { Next } from "Iteration/Next"; +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 146, 12)) + + import { _Append } from "List/Append"; +>_Append : Symbol(_Append, Decl(ramdaToolsNoInfinite2.ts, 147, 12)) + + import { Exclude } from "Union/Exclude"; +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 148, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 149, 12)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 150, 12)) + + type PickIfEntry = Key extends keyof O ? _Append, keyof O>]> : LN; +>PickIfEntry : Symbol(PickIfEntry, Decl(ramdaToolsNoInfinite2.ts, 150, 42)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 152, 21)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 152, 38)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 149, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 152, 55)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 143, 12)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 145, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 152, 55)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 152, 21)) +>_Append : Symbol(_Append, Decl(ramdaToolsNoInfinite2.ts, 147, 12)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 152, 38)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 152, 21)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 144, 12)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 145, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 152, 55)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 152, 21)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 152, 38)) + + type __ListOf> = { +>__ListOf : Symbol(__ListOf, Decl(ramdaToolsNoInfinite2.ts, 152, 147)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 154, 18)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 154, 35)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 154, 38)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 149, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 154, 60)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 143, 12)) +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 142, 12)) + + 0: __ListOf>, PickIfEntry, Next>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 154, 104)) +>__ListOf : Symbol(__ListOf, Decl(ramdaToolsNoInfinite2.ts, 152, 147)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 154, 18)) +>Exclude : Symbol(Exclude, Decl(ramdaToolsNoInfinite2.ts, 148, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 154, 35)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 145, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 154, 60)) +>PickIfEntry : Symbol(PickIfEntry, Decl(ramdaToolsNoInfinite2.ts, 150, 42)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 154, 18)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 154, 38)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 154, 60)) +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 146, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 154, 60)) + + 1: LN; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 155, 75)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 154, 38)) + + }[Extends<[K], [never]>]; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 150, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 154, 35)) + + export type _ListOf = __ListOf extends infer X ? Cast : never; +>_ListOf : Symbol(_ListOf, Decl(ramdaToolsNoInfinite2.ts, 157, 29)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 159, 24)) +>__ListOf : Symbol(__ListOf, Decl(ramdaToolsNoInfinite2.ts, 152, 147)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 159, 24)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 159, 24)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 159, 78)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 144, 12)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 159, 78)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 149, 12)) + + export type ListOf = O extends unknown ? _ListOf : never; +>ListOf : Symbol(ListOf, Decl(ramdaToolsNoInfinite2.ts, 159, 105)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 161, 23)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 161, 23)) +>_ListOf : Symbol(_ListOf, Decl(ramdaToolsNoInfinite2.ts, 157, 29)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 161, 23)) +} +declare module "Object/NonNullable" { +>"Object/NonNullable" : Symbol("Object/NonNullable", Decl(ramdaToolsNoInfinite2.ts, 162, 1)) + + import { MergeFlat } from "Object/Merge"; +>MergeFlat : Symbol(MergeFlat, Decl(ramdaToolsNoInfinite2.ts, 164, 12)) + + import { NonNullable as UNonNullable } from "Union/NonNullable"; +>NonNullable : Symbol(UNonNullable, Decl(ramdaToolsNoInfinite2.ts, 137, 40)) +>UNonNullable : Symbol(UNonNullable, Decl(ramdaToolsNoInfinite2.ts, 165, 12)) + + import { Depth } from "Object/_Internal"; +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 166, 12)) + + import { Pick } from "Object/Pick"; +>Pick : Symbol(Pick, Decl(ramdaToolsNoInfinite2.ts, 167, 12)) + + import { Key } from "Any/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 168, 12)) + + import { Implements } from "Any/Implements"; +>Implements : Symbol(Implements, Decl(ramdaToolsNoInfinite2.ts, 169, 12)) + + import { Keys } from "Object/Keys"; +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 170, 12)) + + export type NonNullableFlat = { +>NonNullableFlat : Symbol(NonNullableFlat, Decl(ramdaToolsNoInfinite2.ts, 170, 39)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 172, 32)) + + [K in keyof O]: UNonNullable; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 173, 9)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 172, 32)) +>UNonNullable : Symbol(UNonNullable, Decl(ramdaToolsNoInfinite2.ts, 165, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 172, 32)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 173, 9)) + + } & {}; + + export type NonNullableDeep = { +>NonNullableDeep : Symbol(NonNullableDeep, Decl(ramdaToolsNoInfinite2.ts, 174, 11)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 176, 32)) + + [K in keyof O]: NonNullableDeep>; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 177, 9)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 176, 32)) +>NonNullableDeep : Symbol(NonNullableDeep, Decl(ramdaToolsNoInfinite2.ts, 174, 11)) +>UNonNullable : Symbol(UNonNullable, Decl(ramdaToolsNoInfinite2.ts, 165, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 176, 32)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 177, 9)) + + }; + + type NonNullablePart = { +>NonNullablePart : Symbol(NonNullablePart, Decl(ramdaToolsNoInfinite2.ts, 178, 6)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 180, 25)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 180, 42)) +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 166, 12)) + + 'flat': NonNullableFlat; +>'flat' : Symbol('flat', Decl(ramdaToolsNoInfinite2.ts, 180, 67)) +>NonNullableFlat : Symbol(NonNullableFlat, Decl(ramdaToolsNoInfinite2.ts, 170, 39)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 180, 25)) + + 'deep': NonNullableDeep; +>'deep' : Symbol('deep', Decl(ramdaToolsNoInfinite2.ts, 181, 35)) +>NonNullableDeep : Symbol(NonNullableDeep, Decl(ramdaToolsNoInfinite2.ts, 174, 11)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 180, 25)) + + }[depth]; +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 180, 42)) + + export type NonNullable = { +>NonNullable : Symbol(NonNullable, Decl(ramdaToolsNoInfinite2.ts, 183, 13)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 185, 28)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 185, 45)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 168, 12)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 168, 12)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 185, 66)) +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 166, 12)) + + 1: NonNullablePart; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 185, 100)) +>NonNullablePart : Symbol(NonNullablePart, Decl(ramdaToolsNoInfinite2.ts, 178, 6)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 185, 28)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 185, 66)) + + 0: MergeFlat, depth>, O>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 186, 37)) +>MergeFlat : Symbol(MergeFlat, Decl(ramdaToolsNoInfinite2.ts, 164, 12)) +>NonNullablePart : Symbol(NonNullablePart, Decl(ramdaToolsNoInfinite2.ts, 178, 6)) +>Pick : Symbol(Pick, Decl(ramdaToolsNoInfinite2.ts, 167, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 185, 28)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 185, 45)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 185, 66)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 185, 28)) + + }[Implements, K>] & {}; +>Implements : Symbol(Implements, Decl(ramdaToolsNoInfinite2.ts, 169, 12)) +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 170, 12)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 185, 28)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 185, 45)) +} +declare module "Object/Overwrite" { +>"Object/Overwrite" : Symbol("Object/Overwrite", Decl(ramdaToolsNoInfinite2.ts, 189, 1)) + + export type Overwrite = { +>Overwrite : Symbol(Overwrite, Decl(ramdaToolsNoInfinite2.ts, 190, 35)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 191, 26)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 191, 43)) + + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 192, 9)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 191, 26)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 192, 9)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 191, 43)) +>O1 : Symbol(O1, Decl(ramdaToolsNoInfinite2.ts, 191, 43)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 192, 9)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 191, 26)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 192, 9)) + + } & {}; +} +declare module "Number/_Internal" { +>"Number/_Internal" : Symbol("Number/_Internal", Decl(ramdaToolsNoInfinite2.ts, 194, 1)) + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) + + import { Format } from "Iteration/Format"; +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) + + export type Formats = 'b' | 'n' | 's'; +>Formats : Symbol(Formats, Decl(ramdaToolsNoInfinite2.ts, 197, 46)) + + type KnownIterationMapKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; +>KnownIterationMapKeys : Symbol(KnownIterationMapKeys, Decl(ramdaToolsNoInfinite2.ts, 199, 42)) + + type PositiveIterationKeys = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; +>PositiveIterationKeys : Symbol(PositiveIterationKeys, Decl(ramdaToolsNoInfinite2.ts, 201, 619)) + + type NegativeIterationKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1'; +>NegativeIterationKeys : Symbol(NegativeIterationKeys, Decl(ramdaToolsNoInfinite2.ts, 203, 302)) + + export type Numbers = { +>Numbers : Symbol(Numbers, Decl(ramdaToolsNoInfinite2.ts, 205, 342)) + + 'string': { +>'string' : Symbol('string', Decl(ramdaToolsNoInfinite2.ts, 207, 27)) + + 'all': Format; +>'all' : Symbol('all', Decl(ramdaToolsNoInfinite2.ts, 208, 19)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) +>KnownIterationMapKeys : Symbol(KnownIterationMapKeys, Decl(ramdaToolsNoInfinite2.ts, 199, 42)) + + '+': Format; +>'+' : Symbol('+', Decl(ramdaToolsNoInfinite2.ts, 209, 68)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) +>PositiveIterationKeys : Symbol(PositiveIterationKeys, Decl(ramdaToolsNoInfinite2.ts, 201, 619)) + + '-': Format; +>'-' : Symbol('-', Decl(ramdaToolsNoInfinite2.ts, 210, 66)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) +>NegativeIterationKeys : Symbol(NegativeIterationKeys, Decl(ramdaToolsNoInfinite2.ts, 203, 302)) + + '0': Format; +>'0' : Symbol('0', Decl(ramdaToolsNoInfinite2.ts, 211, 66)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) + + }; + 'number': { +>'number' : Symbol('number', Decl(ramdaToolsNoInfinite2.ts, 213, 10)) + + 'all': Format; +>'all' : Symbol('all', Decl(ramdaToolsNoInfinite2.ts, 214, 19)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) +>KnownIterationMapKeys : Symbol(KnownIterationMapKeys, Decl(ramdaToolsNoInfinite2.ts, 199, 42)) + + '+': Format; +>'+' : Symbol('+', Decl(ramdaToolsNoInfinite2.ts, 215, 68)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) +>PositiveIterationKeys : Symbol(PositiveIterationKeys, Decl(ramdaToolsNoInfinite2.ts, 201, 619)) + + '-': Format; +>'-' : Symbol('-', Decl(ramdaToolsNoInfinite2.ts, 216, 66)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) +>NegativeIterationKeys : Symbol(NegativeIterationKeys, Decl(ramdaToolsNoInfinite2.ts, 203, 302)) + + '0': Format; +>'0' : Symbol('0', Decl(ramdaToolsNoInfinite2.ts, 217, 66)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 197, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 196, 12)) + + }; + }; +} +declare module "Number/Number" { +>"Number/Number" : Symbol("Number/Number", Decl(ramdaToolsNoInfinite2.ts, 221, 1)) + + export type Number = string; +>Number : Symbol(Number, Decl(ramdaToolsNoInfinite2.ts, 222, 32)) +} +declare module "Iteration/_Internal" { +>"Iteration/_Internal" : Symbol("Iteration/_Internal", Decl(ramdaToolsNoInfinite2.ts, 224, 1)) + + export type Formats = 'n' | 's'; +>Formats : Symbol(Formats, Decl(ramdaToolsNoInfinite2.ts, 225, 38)) + + export type Way = '->' | '<-'; +>Way : Symbol(Way, Decl(ramdaToolsNoInfinite2.ts, 226, 36)) +} +declare module "List/Prepend" { +>"List/Prepend" : Symbol("List/Prepend", Decl(ramdaToolsNoInfinite2.ts, 228, 1)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 230, 12)) + + export type Prepend = ((head: A, ...args: L) => any) extends ((...args: infer U) => any) ? U : L; +>Prepend : Symbol(Prepend, Decl(ramdaToolsNoInfinite2.ts, 230, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 232, 24)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 230, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 232, 39)) +>head : Symbol(head, Decl(ramdaToolsNoInfinite2.ts, 232, 59)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 232, 39)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 232, 67)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 232, 24)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 232, 98)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 232, 112)) +>U : Symbol(U, Decl(ramdaToolsNoInfinite2.ts, 232, 112)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 232, 24)) +} +declare module "List/_Internal" { +>"List/_Internal" : Symbol("List/_Internal", Decl(ramdaToolsNoInfinite2.ts, 233, 1)) + + import { Overwrite } from "Object/Overwrite"; +>Overwrite : Symbol(Overwrite, Decl(ramdaToolsNoInfinite2.ts, 235, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 236, 12)) + + export type Naked = Overwrite, L>; +>Naked : Symbol(Naked, Decl(ramdaToolsNoInfinite2.ts, 236, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 238, 22)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 236, 12)) +>Overwrite : Symbol(Overwrite, Decl(ramdaToolsNoInfinite2.ts, 235, 12)) +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 238, 22)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 238, 22)) +} +declare module "List/Tail" { +>"List/Tail" : Symbol("List/Tail", Decl(ramdaToolsNoInfinite2.ts, 239, 1)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 241, 12)) + + export type Tail = ((...t: L) => any) extends ((head: any, ...tail: infer LTail) => any) ? LTail : never; +>Tail : Symbol(Tail, Decl(ramdaToolsNoInfinite2.ts, 241, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 243, 21)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 241, 12)) +>t : Symbol(t, Decl(ramdaToolsNoInfinite2.ts, 243, 41)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 243, 21)) +>head : Symbol(head, Decl(ramdaToolsNoInfinite2.ts, 243, 68)) +>tail : Symbol(tail, Decl(ramdaToolsNoInfinite2.ts, 243, 78)) +>LTail : Symbol(LTail, Decl(ramdaToolsNoInfinite2.ts, 243, 93)) +>LTail : Symbol(LTail, Decl(ramdaToolsNoInfinite2.ts, 243, 93)) +} +declare module "Iteration/Format" { +>"Iteration/Format" : Symbol("Iteration/Format", Decl(ramdaToolsNoInfinite2.ts, 244, 1)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 246, 12)) + + import { Formats } from "Iteration/_Internal"; +>Formats : Symbol(Formats, Decl(ramdaToolsNoInfinite2.ts, 247, 12)) + + export type Format = { +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 247, 50)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 249, 23)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 246, 12)) +>fmt : Symbol(fmt, Decl(ramdaToolsNoInfinite2.ts, 249, 43)) +>Formats : Symbol(Formats, Decl(ramdaToolsNoInfinite2.ts, 247, 12)) + + 's': I[2]; +>'s' : Symbol('s', Decl(ramdaToolsNoInfinite2.ts, 249, 68)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 249, 23)) + + 'n': I[3]; +>'n' : Symbol('n', Decl(ramdaToolsNoInfinite2.ts, 250, 18)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 249, 23)) + + }[fmt]; +>fmt : Symbol(fmt, Decl(ramdaToolsNoInfinite2.ts, 249, 43)) +} +declare module "Iteration/Pos" { +>"Iteration/Pos" : Symbol("Iteration/Pos", Decl(ramdaToolsNoInfinite2.ts, 253, 1)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 255, 12)) + + import { Format } from "Iteration/Format"; +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 256, 12)) + + export type Pos = Format; +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 256, 46)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 258, 20)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 255, 12)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 256, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 258, 20)) +} +declare module "List/Append" { +>"List/Append" : Symbol("List/Append", Decl(ramdaToolsNoInfinite2.ts, 259, 1)) + + import { _Concat } from "List/Concat"; +>_Concat : Symbol(_Concat, Decl(ramdaToolsNoInfinite2.ts, 261, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 262, 12)) + + export type _Append = _Concat; +>_Append : Symbol(_Append, Decl(ramdaToolsNoInfinite2.ts, 262, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 264, 24)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 262, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 264, 39)) +>_Concat : Symbol(_Concat, Decl(ramdaToolsNoInfinite2.ts, 261, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 264, 24)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 264, 39)) + + export type Append = L extends unknown ? A extends unknown ? _Append : never : never; +>Append : Symbol(Append, Decl(ramdaToolsNoInfinite2.ts, 264, 73)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 266, 23)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 262, 12)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 266, 38)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 266, 23)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 266, 38)) +>_Append : Symbol(_Append, Decl(ramdaToolsNoInfinite2.ts, 262, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 266, 23)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 266, 38)) +} +declare module "List/Reverse" { +>"List/Reverse" : Symbol("List/Reverse", Decl(ramdaToolsNoInfinite2.ts, 267, 1)) + + import { Prepend } from "List/Prepend"; +>Prepend : Symbol(Prepend, Decl(ramdaToolsNoInfinite2.ts, 269, 12)) + + import { Pos } from "Iteration/Pos"; +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 270, 12)) + + import { Next } from "Iteration/Next"; +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 271, 12)) + + import { Length } from "List/Length"; +>Length : Symbol(Length, Decl(ramdaToolsNoInfinite2.ts, 272, 12)) + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 273, 12)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 274, 12)) + + import { Cast } from "Any/Cast"; +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 275, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) + + import { Naked } from "List/_Internal"; +>Naked : Symbol(Naked, Decl(ramdaToolsNoInfinite2.ts, 277, 12)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 278, 12)) + + type __Reverse> = { +>__Reverse : Symbol(__Reverse, Decl(ramdaToolsNoInfinite2.ts, 278, 42)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 280, 19)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 280, 34)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 280, 51)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 274, 12)) +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 273, 12)) + + 0: __Reverse]>, Next>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 280, 95)) +>__Reverse : Symbol(__Reverse, Decl(ramdaToolsNoInfinite2.ts, 278, 42)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 280, 19)) +>Prepend : Symbol(Prepend, Decl(ramdaToolsNoInfinite2.ts, 269, 12)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 280, 34)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 280, 19)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 270, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 280, 51)) +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 271, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 280, 51)) + + 1: LO; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 281, 57)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 280, 34)) + + }[Extends, Length>]; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 278, 12)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 270, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 280, 51)) +>Length : Symbol(Length, Decl(ramdaToolsNoInfinite2.ts, 272, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 280, 19)) + + export type _Reverse = __Reverse, LO> extends infer X ? Cast : never; +>_Reverse : Symbol(_Reverse, Decl(ramdaToolsNoInfinite2.ts, 283, 34)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 285, 25)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 285, 40)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) +>__Reverse : Symbol(__Reverse, Decl(ramdaToolsNoInfinite2.ts, 278, 42)) +>Naked : Symbol(Naked, Decl(ramdaToolsNoInfinite2.ts, 277, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 285, 25)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 285, 40)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 285, 102)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 275, 12)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 285, 102)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) + + export type Reverse = L extends unknown ? LO extends unknown ? _Reverse : never : never; +>Reverse : Symbol(Reverse, Decl(ramdaToolsNoInfinite2.ts, 285, 129)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 287, 24)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 287, 39)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 276, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 287, 24)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 287, 39)) +>_Reverse : Symbol(_Reverse, Decl(ramdaToolsNoInfinite2.ts, 283, 34)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 287, 24)) +>LO : Symbol(LO, Decl(ramdaToolsNoInfinite2.ts, 287, 39)) +} +declare module "List/Concat" { +>"List/Concat" : Symbol("List/Concat", Decl(ramdaToolsNoInfinite2.ts, 288, 1)) + + import { _Reverse } from "List/Reverse"; +>_Reverse : Symbol(_Reverse, Decl(ramdaToolsNoInfinite2.ts, 290, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 291, 12)) + + export type _Concat = _Reverse<_Reverse, L1>; +>_Concat : Symbol(_Concat, Decl(ramdaToolsNoInfinite2.ts, 291, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 293, 24)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 291, 12)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 293, 39)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 291, 12)) +>_Reverse : Symbol(_Reverse, Decl(ramdaToolsNoInfinite2.ts, 290, 12)) +>_Reverse : Symbol(_Reverse, Decl(ramdaToolsNoInfinite2.ts, 290, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 293, 24)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 293, 39)) + + export type Concat = L extends unknown ? L1 extends L1 ? _Concat : never : never; +>Concat : Symbol(Concat, Decl(ramdaToolsNoInfinite2.ts, 293, 85)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 295, 23)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 291, 12)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 295, 38)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 291, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 295, 23)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 295, 38)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 295, 38)) +>_Concat : Symbol(_Concat, Decl(ramdaToolsNoInfinite2.ts, 291, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 295, 23)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 295, 38)) +} +declare module "List/Drop" { +>"List/Drop" : Symbol("List/Drop", Decl(ramdaToolsNoInfinite2.ts, 296, 1)) + + import { Tail } from "List/Tail"; +>Tail : Symbol(Tail, Decl(ramdaToolsNoInfinite2.ts, 298, 12)) + + import { Cast } from "Any/Cast"; +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 299, 12)) + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 300, 12)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 301, 12)) + + import { Number } from "Number/Number"; +>Number : Symbol(Number, Decl(ramdaToolsNoInfinite2.ts, 302, 12)) + + import { Way } from "Iteration/_Internal"; +>Way : Symbol(Way, Decl(ramdaToolsNoInfinite2.ts, 303, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) + + import { Pos } from "Iteration/Pos"; +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 305, 12)) + + import { Prev } from "Iteration/Prev"; +>Prev : Symbol(Prev, Decl(ramdaToolsNoInfinite2.ts, 306, 12)) + + import { Prepend } from "List/Prepend"; +>Prepend : Symbol(Prepend, Decl(ramdaToolsNoInfinite2.ts, 307, 12)) + + import { Naked } from "List/_Internal"; +>Naked : Symbol(Naked, Decl(ramdaToolsNoInfinite2.ts, 308, 12)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 309, 12)) + + type DropForth = { +>DropForth : Symbol(DropForth, Decl(ramdaToolsNoInfinite2.ts, 309, 42)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 311, 19)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 311, 34)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 301, 12)) + + 0: DropForth, Prev>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 311, 59)) +>DropForth : Symbol(DropForth, Decl(ramdaToolsNoInfinite2.ts, 309, 42)) +>Tail : Symbol(Tail, Decl(ramdaToolsNoInfinite2.ts, 298, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 311, 19)) +>Prev : Symbol(Prev, Decl(ramdaToolsNoInfinite2.ts, 306, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 311, 34)) + + 1: L; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 312, 39)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 311, 19)) + + }[Extends<0, Pos>]; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 309, 12)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 305, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 311, 34)) + + type DropBack, LN extends List = []> = { +>DropBack : Symbol(DropBack, Decl(ramdaToolsNoInfinite2.ts, 314, 26)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 316, 18)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 316, 33)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 301, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 316, 54)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 301, 12)) +>Prev : Symbol(Prev, Decl(ramdaToolsNoInfinite2.ts, 306, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 316, 33)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 316, 85)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) + + 0: DropBack, Prepend]>>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 316, 111)) +>DropBack : Symbol(DropBack, Decl(ramdaToolsNoInfinite2.ts, 314, 26)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 316, 18)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 316, 33)) +>Prev : Symbol(Prev, Decl(ramdaToolsNoInfinite2.ts, 306, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 316, 54)) +>Prepend : Symbol(Prepend, Decl(ramdaToolsNoInfinite2.ts, 307, 12)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 316, 85)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 316, 18)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 305, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 316, 54)) + + 1: LN; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 317, 59)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 316, 85)) + + }[Extends<-1, Pos>]; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 309, 12)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 305, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 316, 54)) + + type __Drop = { +>__Drop : Symbol(__Drop, Decl(ramdaToolsNoInfinite2.ts, 319, 27)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 321, 16)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 321, 31)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 301, 12)) +>way : Symbol(way, Decl(ramdaToolsNoInfinite2.ts, 321, 52)) +>Way : Symbol(Way, Decl(ramdaToolsNoInfinite2.ts, 303, 12)) + + '->': DropForth; +>'->' : Symbol('->', Decl(ramdaToolsNoInfinite2.ts, 321, 80)) +>DropForth : Symbol(DropForth, Decl(ramdaToolsNoInfinite2.ts, 309, 42)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 321, 16)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 321, 31)) + + '<-': DropBack; +>'<-' : Symbol('<-', Decl(ramdaToolsNoInfinite2.ts, 322, 30)) +>DropBack : Symbol(DropBack, Decl(ramdaToolsNoInfinite2.ts, 314, 26)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 321, 16)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 321, 31)) + + }[way]; +>way : Symbol(way, Decl(ramdaToolsNoInfinite2.ts, 321, 52)) + + export type _Drop = __Drop, IterationOf, way> extends infer X ? Cast : never; +>_Drop : Symbol(_Drop, Decl(ramdaToolsNoInfinite2.ts, 324, 11)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 326, 22)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 326, 37)) +>Number : Symbol(Number, Decl(ramdaToolsNoInfinite2.ts, 302, 12)) +>way : Symbol(way, Decl(ramdaToolsNoInfinite2.ts, 326, 55)) +>Way : Symbol(Way, Decl(ramdaToolsNoInfinite2.ts, 303, 12)) +>__Drop : Symbol(__Drop, Decl(ramdaToolsNoInfinite2.ts, 319, 27)) +>Naked : Symbol(Naked, Decl(ramdaToolsNoInfinite2.ts, 308, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 326, 22)) +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 300, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 326, 37)) +>way : Symbol(way, Decl(ramdaToolsNoInfinite2.ts, 326, 55)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 326, 133)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 299, 12)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 326, 133)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) + + export type Drop = L extends unknown ? N extends unknown ? _Drop : never : never; +>Drop : Symbol(Drop, Decl(ramdaToolsNoInfinite2.ts, 326, 160)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 328, 21)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 304, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 328, 36)) +>Number : Symbol(Number, Decl(ramdaToolsNoInfinite2.ts, 302, 12)) +>way : Symbol(way, Decl(ramdaToolsNoInfinite2.ts, 328, 54)) +>Way : Symbol(Way, Decl(ramdaToolsNoInfinite2.ts, 303, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 328, 21)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 328, 36)) +>_Drop : Symbol(_Drop, Decl(ramdaToolsNoInfinite2.ts, 324, 11)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 328, 21)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 328, 36)) +>way : Symbol(way, Decl(ramdaToolsNoInfinite2.ts, 328, 54)) +} +declare module "List/Length" { +>"List/Length" : Symbol("List/Length", Decl(ramdaToolsNoInfinite2.ts, 329, 1)) + + import { NumberOf } from "Number/NumberOf"; +>NumberOf : Symbol(NumberOf, Decl(ramdaToolsNoInfinite2.ts, 331, 12)) + + import { Formats } from "Iteration/_Internal"; +>Formats : Symbol(Formats, Decl(ramdaToolsNoInfinite2.ts, 332, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 333, 12)) + + export type Length = { +>Length : Symbol(Length, Decl(ramdaToolsNoInfinite2.ts, 333, 37)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 335, 23)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 333, 12)) +>fmt : Symbol(fmt, Decl(ramdaToolsNoInfinite2.ts, 335, 38)) +>Formats : Symbol(Formats, Decl(ramdaToolsNoInfinite2.ts, 332, 12)) + + 's': NumberOf; +>'s' : Symbol('s', Decl(ramdaToolsNoInfinite2.ts, 335, 69)) +>NumberOf : Symbol(NumberOf, Decl(ramdaToolsNoInfinite2.ts, 331, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 335, 23)) + + 'n': L['length']; +>'n' : Symbol('n', Decl(ramdaToolsNoInfinite2.ts, 336, 35)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 335, 23)) + + }[fmt]; +>fmt : Symbol(fmt, Decl(ramdaToolsNoInfinite2.ts, 335, 38)) +} +declare module "Iteration/Next" { +>"Iteration/Next" : Symbol("Iteration/Next", Decl(ramdaToolsNoInfinite2.ts, 339, 1)) + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 341, 12)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 342, 12)) + + export type Next = IterationMap[I[1]]; +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 342, 52)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 344, 21)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 342, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 341, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 344, 21)) +} +declare module "Any/Cast" { +>"Any/Cast" : Symbol("Any/Cast", Decl(ramdaToolsNoInfinite2.ts, 345, 1)) + + export type Cast = A1 extends A2 ? A1 : A2; +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 346, 27)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 347, 21)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 347, 36)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 347, 21)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 347, 36)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 347, 21)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 347, 36)) +} +declare module "Function/Parameters" { +>"Function/Parameters" : Symbol("Function/Parameters", Decl(ramdaToolsNoInfinite2.ts, 348, 1)) + + import { Function } from "Function/Function"; +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 350, 12)) + + export type Parameters = F extends ((...args: infer L) => any) ? L : never; +>Parameters : Symbol(Parameters, Decl(ramdaToolsNoInfinite2.ts, 350, 49)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 352, 27)) +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 350, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 352, 27)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 352, 61)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 352, 75)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 352, 75)) +} +declare module "Function/Return" { +>"Function/Return" : Symbol("Function/Return", Decl(ramdaToolsNoInfinite2.ts, 353, 1)) + + import { Function } from "Function/Function"; +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 355, 12)) + + export type Return = F extends ((...args: any[]) => infer R) ? R : never; +>Return : Symbol(Return, Decl(ramdaToolsNoInfinite2.ts, 355, 49)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 357, 23)) +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 355, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 357, 23)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 357, 57)) +>R : Symbol(R, Decl(ramdaToolsNoInfinite2.ts, 357, 81)) +>R : Symbol(R, Decl(ramdaToolsNoInfinite2.ts, 357, 81)) +} +declare module "Iteration/Prev" { +>"Iteration/Prev" : Symbol("Iteration/Prev", Decl(ramdaToolsNoInfinite2.ts, 358, 1)) + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 360, 12)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 361, 12)) + + export type Prev = IterationMap[I[0]]; +>Prev : Symbol(Prev, Decl(ramdaToolsNoInfinite2.ts, 361, 52)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 363, 21)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 361, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 360, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 363, 21)) +} +declare module "Number/NumberOf" { +>"Number/NumberOf" : Symbol("Number/NumberOf", Decl(ramdaToolsNoInfinite2.ts, 364, 1)) + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 366, 12)) + + import { Key } from "Iteration/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 367, 12)) + + import { Pos } from "Iteration/Pos"; +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 368, 12)) + + import { Numbers } from "Number/_Internal"; +>Numbers : Symbol(Numbers, Decl(ramdaToolsNoInfinite2.ts, 369, 12)) + + export type _NumberOf = { +>_NumberOf : Symbol(_NumberOf, Decl(ramdaToolsNoInfinite2.ts, 369, 47)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 371, 26)) + + [K in keyof IterationMap]: Pos extends N ? Key : never; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 372, 9)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 366, 12)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 368, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 366, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 372, 9)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 371, 26)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 367, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 366, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 372, 9)) + + }[keyof IterationMap]; +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 366, 12)) + + export type NumberOf = N extends Numbers['number']['all'] ? _NumberOf : string; +>NumberOf : Symbol(NumberOf, Decl(ramdaToolsNoInfinite2.ts, 373, 26)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 375, 25)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 375, 25)) +>Numbers : Symbol(Numbers, Decl(ramdaToolsNoInfinite2.ts, 369, 12)) +>_NumberOf : Symbol(_NumberOf, Decl(ramdaToolsNoInfinite2.ts, 369, 47)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 375, 25)) +} +declare module "Object/_Internal" { +>"Object/_Internal" : Symbol("Object/_Internal", Decl(ramdaToolsNoInfinite2.ts, 376, 1)) + + export type Modx = ['?' | '!', 'W' | 'R']; +>Modx : Symbol(Modx, Decl(ramdaToolsNoInfinite2.ts, 377, 35)) + + export type Depth = 'flat' | 'deep'; +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 378, 46)) + + export type Empty = { +>Empty : Symbol(Empty, Decl(ramdaToolsNoInfinite2.ts, 380, 40)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 382, 22)) + + [K in keyof O]: undefined; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 383, 9)) +>O : Symbol(O, Decl(ramdaToolsNoInfinite2.ts, 382, 22)) + + }; +} +declare module "Iteration/IterationOf" { +>"Iteration/IterationOf" : Symbol("Iteration/IterationOf", Decl(ramdaToolsNoInfinite2.ts, 385, 1)) + + import { Number } from "Number/Number"; +>Number : Symbol(Number, Decl(ramdaToolsNoInfinite2.ts, 387, 12)) + + export type IterationMap = { +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 387, 43)) + + '-40': ['__', '-39', '-40', -40, '-']; +>'-40' : Symbol('-40', Decl(ramdaToolsNoInfinite2.ts, 389, 32)) + + '-39': ['-40', '-38', '-39', -39, '-']; +>'-39' : Symbol('-39', Decl(ramdaToolsNoInfinite2.ts, 390, 46)) + + '-38': ['-39', '-37', '-38', -38, '-']; +>'-38' : Symbol('-38', Decl(ramdaToolsNoInfinite2.ts, 391, 47)) + + '-37': ['-38', '-36', '-37', -37, '-']; +>'-37' : Symbol('-37', Decl(ramdaToolsNoInfinite2.ts, 392, 47)) + + '-36': ['-37', '-35', '-36', -36, '-']; +>'-36' : Symbol('-36', Decl(ramdaToolsNoInfinite2.ts, 393, 47)) + + '-35': ['-36', '-34', '-35', -35, '-']; +>'-35' : Symbol('-35', Decl(ramdaToolsNoInfinite2.ts, 394, 47)) + + '-34': ['-35', '-33', '-34', -34, '-']; +>'-34' : Symbol('-34', Decl(ramdaToolsNoInfinite2.ts, 395, 47)) + + '-33': ['-34', '-32', '-33', -33, '-']; +>'-33' : Symbol('-33', Decl(ramdaToolsNoInfinite2.ts, 396, 47)) + + '-32': ['-33', '-31', '-32', -32, '-']; +>'-32' : Symbol('-32', Decl(ramdaToolsNoInfinite2.ts, 397, 47)) + + '-31': ['-32', '-30', '-31', -31, '-']; +>'-31' : Symbol('-31', Decl(ramdaToolsNoInfinite2.ts, 398, 47)) + + '-30': ['-31', '-29', '-30', -30, '-']; +>'-30' : Symbol('-30', Decl(ramdaToolsNoInfinite2.ts, 399, 47)) + + '-29': ['-30', '-28', '-29', -29, '-']; +>'-29' : Symbol('-29', Decl(ramdaToolsNoInfinite2.ts, 400, 47)) + + '-28': ['-29', '-27', '-28', -28, '-']; +>'-28' : Symbol('-28', Decl(ramdaToolsNoInfinite2.ts, 401, 47)) + + '-27': ['-28', '-26', '-27', -27, '-']; +>'-27' : Symbol('-27', Decl(ramdaToolsNoInfinite2.ts, 402, 47)) + + '-26': ['-27', '-25', '-26', -26, '-']; +>'-26' : Symbol('-26', Decl(ramdaToolsNoInfinite2.ts, 403, 47)) + + '-25': ['-26', '-24', '-25', -25, '-']; +>'-25' : Symbol('-25', Decl(ramdaToolsNoInfinite2.ts, 404, 47)) + + '-24': ['-25', '-23', '-24', -24, '-']; +>'-24' : Symbol('-24', Decl(ramdaToolsNoInfinite2.ts, 405, 47)) + + '-23': ['-24', '-22', '-23', -23, '-']; +>'-23' : Symbol('-23', Decl(ramdaToolsNoInfinite2.ts, 406, 47)) + + '-22': ['-23', '-21', '-22', -22, '-']; +>'-22' : Symbol('-22', Decl(ramdaToolsNoInfinite2.ts, 407, 47)) + + '-21': ['-22', '-20', '-21', -21, '-']; +>'-21' : Symbol('-21', Decl(ramdaToolsNoInfinite2.ts, 408, 47)) + + '-20': ['-21', '-19', '-20', -20, '-']; +>'-20' : Symbol('-20', Decl(ramdaToolsNoInfinite2.ts, 409, 47)) + + '-19': ['-20', '-18', '-19', -19, '-']; +>'-19' : Symbol('-19', Decl(ramdaToolsNoInfinite2.ts, 410, 47)) + + '-18': ['-19', '-17', '-18', -18, '-']; +>'-18' : Symbol('-18', Decl(ramdaToolsNoInfinite2.ts, 411, 47)) + + '-17': ['-18', '-16', '-17', -17, '-']; +>'-17' : Symbol('-17', Decl(ramdaToolsNoInfinite2.ts, 412, 47)) + + '-16': ['-17', '-15', '-16', -16, '-']; +>'-16' : Symbol('-16', Decl(ramdaToolsNoInfinite2.ts, 413, 47)) + + '-15': ['-16', '-14', '-15', -15, '-']; +>'-15' : Symbol('-15', Decl(ramdaToolsNoInfinite2.ts, 414, 47)) + + '-14': ['-15', '-13', '-14', -14, '-']; +>'-14' : Symbol('-14', Decl(ramdaToolsNoInfinite2.ts, 415, 47)) + + '-13': ['-14', '-12', '-13', -13, '-']; +>'-13' : Symbol('-13', Decl(ramdaToolsNoInfinite2.ts, 416, 47)) + + '-12': ['-13', '-11', '-12', -12, '-']; +>'-12' : Symbol('-12', Decl(ramdaToolsNoInfinite2.ts, 417, 47)) + + '-11': ['-12', '-10', '-11', -11, '-']; +>'-11' : Symbol('-11', Decl(ramdaToolsNoInfinite2.ts, 418, 47)) + + '-10': ['-11', '-9', '-10', -10, '-']; +>'-10' : Symbol('-10', Decl(ramdaToolsNoInfinite2.ts, 419, 47)) + + '-9': ['-10', '-8', '-9', -9, '-']; +>'-9' : Symbol('-9', Decl(ramdaToolsNoInfinite2.ts, 420, 46)) + + '-8': ['-9', '-7', '-8', -8, '-']; +>'-8' : Symbol('-8', Decl(ramdaToolsNoInfinite2.ts, 421, 43)) + + '-7': ['-8', '-6', '-7', -7, '-']; +>'-7' : Symbol('-7', Decl(ramdaToolsNoInfinite2.ts, 422, 42)) + + '-6': ['-7', '-5', '-6', -6, '-']; +>'-6' : Symbol('-6', Decl(ramdaToolsNoInfinite2.ts, 423, 42)) + + '-5': ['-6', '-4', '-5', -5, '-']; +>'-5' : Symbol('-5', Decl(ramdaToolsNoInfinite2.ts, 424, 42)) + + '-4': ['-5', '-3', '-4', -4, '-']; +>'-4' : Symbol('-4', Decl(ramdaToolsNoInfinite2.ts, 425, 42)) + + '-3': ['-4', '-2', '-3', -3, '-']; +>'-3' : Symbol('-3', Decl(ramdaToolsNoInfinite2.ts, 426, 42)) + + '-2': ['-3', '-1', '-2', -2, '-']; +>'-2' : Symbol('-2', Decl(ramdaToolsNoInfinite2.ts, 427, 42)) + + '-1': ['-2', '0', '-1', -1, '-']; +>'-1' : Symbol('-1', Decl(ramdaToolsNoInfinite2.ts, 428, 42)) + + '0': ['-1', '1', '0', 0, '0']; +>'0' : Symbol('0', Decl(ramdaToolsNoInfinite2.ts, 429, 41)) + + '1': ['0', '2', '1', 1, '+']; +>'1' : Symbol('1', Decl(ramdaToolsNoInfinite2.ts, 430, 38)) + + '2': ['1', '3', '2', 2, '+']; +>'2' : Symbol('2', Decl(ramdaToolsNoInfinite2.ts, 431, 37)) + + '3': ['2', '4', '3', 3, '+']; +>'3' : Symbol('3', Decl(ramdaToolsNoInfinite2.ts, 432, 37)) + + '4': ['3', '5', '4', 4, '+']; +>'4' : Symbol('4', Decl(ramdaToolsNoInfinite2.ts, 433, 37)) + + '5': ['4', '6', '5', 5, '+']; +>'5' : Symbol('5', Decl(ramdaToolsNoInfinite2.ts, 434, 37)) + + '6': ['5', '7', '6', 6, '+']; +>'6' : Symbol('6', Decl(ramdaToolsNoInfinite2.ts, 435, 37)) + + '7': ['6', '8', '7', 7, '+']; +>'7' : Symbol('7', Decl(ramdaToolsNoInfinite2.ts, 436, 37)) + + '8': ['7', '9', '8', 8, '+']; +>'8' : Symbol('8', Decl(ramdaToolsNoInfinite2.ts, 437, 37)) + + '9': ['8', '10', '9', 9, '+']; +>'9' : Symbol('9', Decl(ramdaToolsNoInfinite2.ts, 438, 37)) + + '10': ['9', '11', '10', 10, '+']; +>'10' : Symbol('10', Decl(ramdaToolsNoInfinite2.ts, 439, 38)) + + '11': ['10', '12', '11', 11, '+']; +>'11' : Symbol('11', Decl(ramdaToolsNoInfinite2.ts, 440, 41)) + + '12': ['11', '13', '12', 12, '+']; +>'12' : Symbol('12', Decl(ramdaToolsNoInfinite2.ts, 441, 42)) + + '13': ['12', '14', '13', 13, '+']; +>'13' : Symbol('13', Decl(ramdaToolsNoInfinite2.ts, 442, 42)) + + '14': ['13', '15', '14', 14, '+']; +>'14' : Symbol('14', Decl(ramdaToolsNoInfinite2.ts, 443, 42)) + + '15': ['14', '16', '15', 15, '+']; +>'15' : Symbol('15', Decl(ramdaToolsNoInfinite2.ts, 444, 42)) + + '16': ['15', '17', '16', 16, '+']; +>'16' : Symbol('16', Decl(ramdaToolsNoInfinite2.ts, 445, 42)) + + '17': ['16', '18', '17', 17, '+']; +>'17' : Symbol('17', Decl(ramdaToolsNoInfinite2.ts, 446, 42)) + + '18': ['17', '19', '18', 18, '+']; +>'18' : Symbol('18', Decl(ramdaToolsNoInfinite2.ts, 447, 42)) + + '19': ['18', '20', '19', 19, '+']; +>'19' : Symbol('19', Decl(ramdaToolsNoInfinite2.ts, 448, 42)) + + '20': ['19', '21', '20', 20, '+']; +>'20' : Symbol('20', Decl(ramdaToolsNoInfinite2.ts, 449, 42)) + + '21': ['20', '22', '21', 21, '+']; +>'21' : Symbol('21', Decl(ramdaToolsNoInfinite2.ts, 450, 42)) + + '22': ['21', '23', '22', 22, '+']; +>'22' : Symbol('22', Decl(ramdaToolsNoInfinite2.ts, 451, 42)) + + '23': ['22', '24', '23', 23, '+']; +>'23' : Symbol('23', Decl(ramdaToolsNoInfinite2.ts, 452, 42)) + + '24': ['23', '25', '24', 24, '+']; +>'24' : Symbol('24', Decl(ramdaToolsNoInfinite2.ts, 453, 42)) + + '25': ['24', '26', '25', 25, '+']; +>'25' : Symbol('25', Decl(ramdaToolsNoInfinite2.ts, 454, 42)) + + '26': ['25', '27', '26', 26, '+']; +>'26' : Symbol('26', Decl(ramdaToolsNoInfinite2.ts, 455, 42)) + + '27': ['26', '28', '27', 27, '+']; +>'27' : Symbol('27', Decl(ramdaToolsNoInfinite2.ts, 456, 42)) + + '28': ['27', '29', '28', 28, '+']; +>'28' : Symbol('28', Decl(ramdaToolsNoInfinite2.ts, 457, 42)) + + '29': ['28', '30', '29', 29, '+']; +>'29' : Symbol('29', Decl(ramdaToolsNoInfinite2.ts, 458, 42)) + + '30': ['29', '31', '30', 30, '+']; +>'30' : Symbol('30', Decl(ramdaToolsNoInfinite2.ts, 459, 42)) + + '31': ['30', '32', '31', 31, '+']; +>'31' : Symbol('31', Decl(ramdaToolsNoInfinite2.ts, 460, 42)) + + '32': ['31', '33', '32', 32, '+']; +>'32' : Symbol('32', Decl(ramdaToolsNoInfinite2.ts, 461, 42)) + + '33': ['32', '34', '33', 33, '+']; +>'33' : Symbol('33', Decl(ramdaToolsNoInfinite2.ts, 462, 42)) + + '34': ['33', '35', '34', 34, '+']; +>'34' : Symbol('34', Decl(ramdaToolsNoInfinite2.ts, 463, 42)) + + '35': ['34', '36', '35', 35, '+']; +>'35' : Symbol('35', Decl(ramdaToolsNoInfinite2.ts, 464, 42)) + + '36': ['35', '37', '36', 36, '+']; +>'36' : Symbol('36', Decl(ramdaToolsNoInfinite2.ts, 465, 42)) + + '37': ['36', '38', '37', 37, '+']; +>'37' : Symbol('37', Decl(ramdaToolsNoInfinite2.ts, 466, 42)) + + '38': ['37', '39', '38', 38, '+']; +>'38' : Symbol('38', Decl(ramdaToolsNoInfinite2.ts, 467, 42)) + + '39': ['38', '40', '39', 39, '+']; +>'39' : Symbol('39', Decl(ramdaToolsNoInfinite2.ts, 468, 42)) + + '40': ['39', '__', '40', 40, '+']; +>'40' : Symbol('40', Decl(ramdaToolsNoInfinite2.ts, 469, 42)) + + '__': ['__', '__', string, number, '-' | '0' | '+']; +>'__' : Symbol('__', Decl(ramdaToolsNoInfinite2.ts, 470, 42)) + + }; + + export type IterationOf = N extends keyof IterationMap ? IterationMap[N] : IterationMap['__']; +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 472, 6)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 474, 28)) +>Number : Symbol(Number, Decl(ramdaToolsNoInfinite2.ts, 387, 12)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 474, 28)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 387, 43)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 387, 43)) +>N : Symbol(N, Decl(ramdaToolsNoInfinite2.ts, 474, 28)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 387, 43)) +} +declare module "Iteration/Iteration" { +>"Iteration/Iteration" : Symbol("Iteration/Iteration", Decl(ramdaToolsNoInfinite2.ts, 475, 1)) + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 477, 12)) + + export type Iteration = [keyof IterationMap, keyof IterationMap, string, number, '-' | '0' | '+']; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 477, 57)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 477, 12)) +>IterationMap : Symbol(IterationMap, Decl(ramdaToolsNoInfinite2.ts, 477, 12)) +} +declare module "Iteration/Key" { +>"Iteration/Key" : Symbol("Iteration/Key", Decl(ramdaToolsNoInfinite2.ts, 480, 1)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 482, 12)) + + import { Format } from "Iteration/Format"; +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 483, 12)) + + export type Key = Format; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 483, 46)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 485, 20)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 482, 12)) +>Format : Symbol(Format, Decl(ramdaToolsNoInfinite2.ts, 483, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 485, 20)) +} +declare module "List/NonNullable" { +>"List/NonNullable" : Symbol("List/NonNullable", Decl(ramdaToolsNoInfinite2.ts, 486, 1)) + + import { Depth } from "Object/_Internal"; +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 488, 12)) + + import { NonNullable as ONonNullable } from "Object/NonNullable"; +>NonNullable : Symbol(ONonNullable, Decl(ramdaToolsNoInfinite2.ts, 183, 13)) +>ONonNullable : Symbol(ONonNullable, Decl(ramdaToolsNoInfinite2.ts, 489, 12)) + + import { ListOf } from "Object/ListOf"; +>ListOf : Symbol(ListOf, Decl(ramdaToolsNoInfinite2.ts, 490, 12)) + + import { Cast } from "Any/Cast"; +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 491, 12)) + + import { Key } from "Any/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 492, 12)) + + import { ObjectOf } from "List/ObjectOf"; +>ObjectOf : Symbol(ObjectOf, Decl(ramdaToolsNoInfinite2.ts, 493, 12)) + + import { Implements } from "Any/Implements"; +>Implements : Symbol(Implements, Decl(ramdaToolsNoInfinite2.ts, 494, 12)) + + import { Keys } from "List/Keys"; +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 495, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 496, 12)) + + import { NumberOf } from "Any/_Internal"; +>NumberOf : Symbol(NumberOf, Decl(ramdaToolsNoInfinite2.ts, 497, 12)) + + export type NonNullable = { +>NonNullable : Symbol(NonNullable, Decl(ramdaToolsNoInfinite2.ts, 497, 45)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 499, 28)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 496, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 499, 43)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 492, 12)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 492, 12)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 499, 64)) +>Depth : Symbol(Depth, Decl(ramdaToolsNoInfinite2.ts, 488, 12)) + + 1: Cast, List>; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 499, 98)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 491, 12)) +>ONonNullable : Symbol(ONonNullable, Decl(ramdaToolsNoInfinite2.ts, 489, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 499, 28)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 492, 12)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 499, 64)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 496, 12)) + + 0: ListOf, NumberOf, depth>>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 500, 51)) +>ListOf : Symbol(ListOf, Decl(ramdaToolsNoInfinite2.ts, 490, 12)) +>ONonNullable : Symbol(ONonNullable, Decl(ramdaToolsNoInfinite2.ts, 489, 12)) +>ObjectOf : Symbol(ObjectOf, Decl(ramdaToolsNoInfinite2.ts, 493, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 499, 28)) +>NumberOf : Symbol(NumberOf, Decl(ramdaToolsNoInfinite2.ts, 497, 12)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 499, 43)) +>depth : Symbol(depth, Decl(ramdaToolsNoInfinite2.ts, 499, 64)) + + }[Implements, K>] & {}; +>Implements : Symbol(Implements, Decl(ramdaToolsNoInfinite2.ts, 494, 12)) +>Keys : Symbol(Keys, Decl(ramdaToolsNoInfinite2.ts, 495, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 499, 28)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 499, 43)) +} +declare module "Any/Type" { +>"Any/Type" : Symbol("Any/Type", Decl(ramdaToolsNoInfinite2.ts, 503, 1)) + + const symbol: unique symbol; +>symbol : Symbol(symbol, Decl(ramdaToolsNoInfinite2.ts, 505, 9)) + + export type Type = A & { +>Type : Symbol(Type, Decl(ramdaToolsNoInfinite2.ts, 505, 32)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 507, 21)) +>Id : Symbol(Id, Decl(ramdaToolsNoInfinite2.ts, 507, 35)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 507, 21)) + + [K in typeof symbol]: Id; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 508, 9)) +>symbol : Symbol(symbol, Decl(ramdaToolsNoInfinite2.ts, 505, 9)) +>Id : Symbol(Id, Decl(ramdaToolsNoInfinite2.ts, 507, 35)) + + }; +} +declare module "Any/x" { +>"Any/x" : Symbol("Any/x", Decl(ramdaToolsNoInfinite2.ts, 510, 1)) + + import { Type } from "Any/Type"; +>Type : Symbol(Type, Decl(ramdaToolsNoInfinite2.ts, 512, 12)) + + export type x = Type<{}, 'x'>; +>x : Symbol(x, Decl(ramdaToolsNoInfinite2.ts, 512, 36)) +>Type : Symbol(Type, Decl(ramdaToolsNoInfinite2.ts, 512, 12)) +} +declare module "List/List" { +>"List/List" : Symbol("List/List", Decl(ramdaToolsNoInfinite2.ts, 515, 1)) + + export type List = ReadonlyArray; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 516, 28)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 518, 21)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) +>A : Symbol(A, Decl(ramdaToolsNoInfinite2.ts, 518, 21)) +} +declare module "Function/Function" { +>"Function/Function" : Symbol("Function/Function", Decl(ramdaToolsNoInfinite2.ts, 519, 1)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 521, 12)) + + export interface Function

{ +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 521, 37)) +>P : Symbol(P, Decl(ramdaToolsNoInfinite2.ts, 523, 30)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 521, 12)) +>R : Symbol(R, Decl(ramdaToolsNoInfinite2.ts, 523, 51)) + + (...args: P): R; +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 524, 9)) +>P : Symbol(P, Decl(ramdaToolsNoInfinite2.ts, 523, 30)) +>R : Symbol(R, Decl(ramdaToolsNoInfinite2.ts, 523, 51)) + } +} +declare module "Any/Extends" { +>"Any/Extends" : Symbol("Any/Extends", Decl(ramdaToolsNoInfinite2.ts, 526, 1)) + + export type Extends = [A1] extends [never] ? 0 : A1 extends A2 ? 1 : 0; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 527, 30)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 528, 24)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 528, 39)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 528, 24)) +>A1 : Symbol(A1, Decl(ramdaToolsNoInfinite2.ts, 528, 24)) +>A2 : Symbol(A2, Decl(ramdaToolsNoInfinite2.ts, 528, 39)) +} + +declare module "Function/Curry" { +>"Function/Curry" : Symbol("Function/Curry", Decl(ramdaToolsNoInfinite2.ts, 529, 1)) + + import { Pos } from "Iteration/Pos"; +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 532, 12)) + + import { _Append } from "List/Append"; +>_Append : Symbol(_Append, Decl(ramdaToolsNoInfinite2.ts, 533, 12)) + + import { _Concat } from "List/Concat"; +>_Concat : Symbol(_Concat, Decl(ramdaToolsNoInfinite2.ts, 534, 12)) + + import { _Drop } from "List/Drop"; +>_Drop : Symbol(_Drop, Decl(ramdaToolsNoInfinite2.ts, 535, 12)) + + import { Length } from "List/Length"; +>Length : Symbol(Length, Decl(ramdaToolsNoInfinite2.ts, 536, 12)) + + import { Next } from "Iteration/Next"; +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 537, 12)) + + import { Cast } from "Any/Cast"; +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) + + import { Parameters } from "Function/Parameters"; +>Parameters : Symbol(Parameters, Decl(ramdaToolsNoInfinite2.ts, 539, 12)) + + import { Return } from "Function/Return"; +>Return : Symbol(Return, Decl(ramdaToolsNoInfinite2.ts, 540, 12)) + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 541, 12)) + + import { Iteration } from "Iteration/Iteration"; +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 542, 12)) + + import { Key } from "Iteration/Key"; +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 543, 12)) + + import { NonNullable } from "List/NonNullable"; +>NonNullable : Symbol(NonNullable, Decl(ramdaToolsNoInfinite2.ts, 544, 12)) + + import { x } from "Any/x"; +>x : Symbol(x, Decl(ramdaToolsNoInfinite2.ts, 545, 12)) + + import { List } from "List/List"; +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) + + import { Function } from "Function/Function"; +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 547, 12)) + + import { Extends } from "Any/Extends"; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 548, 12)) + + type GapOf> = L1[Pos] extends x ? _Append]> : LN; +>GapOf : Symbol(GapOf, Decl(ramdaToolsNoInfinite2.ts, 548, 42)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 550, 15)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 550, 31)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 550, 48)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 550, 65)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 542, 12)) +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 541, 12)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 550, 15)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 532, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 550, 65)) +>x : Symbol(x, Decl(ramdaToolsNoInfinite2.ts, 545, 12)) +>_Append : Symbol(_Append, Decl(ramdaToolsNoInfinite2.ts, 533, 12)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 550, 48)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 550, 31)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 532, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 550, 65)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 550, 48)) + + type _GapsOf> = { +>_GapsOf : Symbol(_GapsOf, Decl(ramdaToolsNoInfinite2.ts, 550, 160)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 552, 17)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 552, 33)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 552, 50)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 552, 72)) +>Iteration : Symbol(Iteration, Decl(ramdaToolsNoInfinite2.ts, 542, 12)) +>IterationOf : Symbol(IterationOf, Decl(ramdaToolsNoInfinite2.ts, 541, 12)) + + 0: _GapsOf, Next>; +>0 : Symbol(0, Decl(ramdaToolsNoInfinite2.ts, 552, 116)) +>_GapsOf : Symbol(_GapsOf, Decl(ramdaToolsNoInfinite2.ts, 550, 160)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 552, 17)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 552, 33)) +>GapOf : Symbol(GapOf, Decl(ramdaToolsNoInfinite2.ts, 548, 42)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 552, 17)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 552, 33)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 552, 50)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 552, 72)) +>Next : Symbol(Next, Decl(ramdaToolsNoInfinite2.ts, 537, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 552, 72)) + + 1: _Concat>>; +>1 : Symbol(1, Decl(ramdaToolsNoInfinite2.ts, 553, 58)) +>_Concat : Symbol(_Concat, Decl(ramdaToolsNoInfinite2.ts, 534, 12)) +>LN : Symbol(LN, Decl(ramdaToolsNoInfinite2.ts, 552, 50)) +>_Drop : Symbol(_Drop, Decl(ramdaToolsNoInfinite2.ts, 535, 12)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 552, 33)) +>Key : Symbol(Key, Decl(ramdaToolsNoInfinite2.ts, 543, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 552, 72)) + + }[Extends, Length>]; +>Extends : Symbol(Extends, Decl(ramdaToolsNoInfinite2.ts, 548, 12)) +>Pos : Symbol(Pos, Decl(ramdaToolsNoInfinite2.ts, 532, 12)) +>I : Symbol(I, Decl(ramdaToolsNoInfinite2.ts, 552, 72)) +>Length : Symbol(Length, Decl(ramdaToolsNoInfinite2.ts, 536, 12)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 552, 17)) + + type GapsOf = _GapsOf extends infer X ? Cast : never; +>GapsOf : Symbol(GapsOf, Decl(ramdaToolsNoInfinite2.ts, 555, 35)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 557, 16)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 557, 32)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>_GapsOf : Symbol(_GapsOf, Decl(ramdaToolsNoInfinite2.ts, 550, 160)) +>L1 : Symbol(L1, Decl(ramdaToolsNoInfinite2.ts, 557, 16)) +>L2 : Symbol(L2, Decl(ramdaToolsNoInfinite2.ts, 557, 32)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 557, 81)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) +>X : Symbol(X, Decl(ramdaToolsNoInfinite2.ts, 557, 81)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) + + type Gaps = NonNullable<{ +>Gaps : Symbol(Gaps, Decl(ramdaToolsNoInfinite2.ts, 557, 108)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 559, 14)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>NonNullable : Symbol(NonNullable, Decl(ramdaToolsNoInfinite2.ts, 544, 12)) + + [K in keyof L]?: L[K] | x; +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 560, 9)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 559, 14)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 559, 14)) +>K : Symbol(K, Decl(ramdaToolsNoInfinite2.ts, 560, 9)) +>x : Symbol(x, Decl(ramdaToolsNoInfinite2.ts, 545, 12)) + + }>; + + export type Curry = (...args: Cast>>) => GapsOf> extends infer G ? Length> extends infer L ? L extends 0 ? Return : L extends 1 ? Curry<(...args: Cast) => Return> & ((...args: Cast) => Return) : Curry<(...args: Cast) => Return> : never : never; +>Curry : Symbol(Curry, Decl(ramdaToolsNoInfinite2.ts, 561, 7)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +>Function : Symbol(Function, Decl(ramdaToolsNoInfinite2.ts, 547, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 563, 45)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 563, 61)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 563, 45)) +>Gaps : Symbol(Gaps, Decl(ramdaToolsNoInfinite2.ts, 557, 108)) +>Parameters : Symbol(Parameters, Decl(ramdaToolsNoInfinite2.ts, 539, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +>GapsOf : Symbol(GapsOf, Decl(ramdaToolsNoInfinite2.ts, 555, 35)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 563, 45)) +>Parameters : Symbol(Parameters, Decl(ramdaToolsNoInfinite2.ts, 539, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +>G : Symbol(G, Decl(ramdaToolsNoInfinite2.ts, 563, 141)) +>Length : Symbol(Length, Decl(ramdaToolsNoInfinite2.ts, 536, 12)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) +>G : Symbol(G, Decl(ramdaToolsNoInfinite2.ts, 563, 141)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 563, 181)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 563, 181)) +>Return : Symbol(Return, Decl(ramdaToolsNoInfinite2.ts, 540, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +>L : Symbol(L, Decl(ramdaToolsNoInfinite2.ts, 563, 181)) +>Curry : Symbol(Curry, Decl(ramdaToolsNoInfinite2.ts, 561, 7)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 563, 233)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) +>G : Symbol(G, Decl(ramdaToolsNoInfinite2.ts, 563, 141)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>Return : Symbol(Return, Decl(ramdaToolsNoInfinite2.ts, 540, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 563, 275)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) +>G : Symbol(G, Decl(ramdaToolsNoInfinite2.ts, 563, 141)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>Return : Symbol(Return, Decl(ramdaToolsNoInfinite2.ts, 540, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +>Curry : Symbol(Curry, Decl(ramdaToolsNoInfinite2.ts, 561, 7)) +>args : Symbol(args, Decl(ramdaToolsNoInfinite2.ts, 563, 322)) +>Cast : Symbol(Cast, Decl(ramdaToolsNoInfinite2.ts, 538, 12)) +>G : Symbol(G, Decl(ramdaToolsNoInfinite2.ts, 563, 141)) +>List : Symbol(List, Decl(ramdaToolsNoInfinite2.ts, 546, 12)) +>Return : Symbol(Return, Decl(ramdaToolsNoInfinite2.ts, 540, 12)) +>F : Symbol(F, Decl(ramdaToolsNoInfinite2.ts, 563, 22)) +} + + + diff --git a/tests/baselines/reference/ramdaToolsNoInfinite2.types b/tests/baselines/reference/ramdaToolsNoInfinite2.types new file mode 100644 index 0000000000000..b61d0ef3754fa --- /dev/null +++ b/tests/baselines/reference/ramdaToolsNoInfinite2.types @@ -0,0 +1,1354 @@ +=== tests/cases/compiler/ramdaToolsNoInfinite2.ts === +declare module "Any/Kind" { +>"Any/Kind" : typeof import("Any/Kind") + + import { Extends } from "Any/Extends"; +>Extends : any + + import { List } from "List/List"; +>List : any + + export type Kind = Extends extends 1 ? 'function' : Extends extends 1 ? 'array' : Extends extends 1 ? 'object' : Extends extends 1 ? 'string' : Extends extends 1 ? 'number' : Extends extends 1 ? 'boolean' : 'unknown'; +>Kind : Kind +} +declare module "Any/Compute" { +>"Any/Compute" : typeof import("Any/Compute") + + export type Compute = A extends Function ? A : { +>Compute : Compute + + [K in keyof A]: A[K]; + } & {}; +} +declare module "Object/Pick" { +>"Object/Pick" : typeof import("Object/Pick") + + import { Key } from "Any/Key"; +>Key : any + + type __Pick = { +>__Pick : { [P in K]: O[P]; } + + [P in K]: O[P]; + } & {}; + + export type _Pick = __Pick; +>_Pick : _Pick + + export type Pick = O extends unknown ? _Pick : never; +>Pick : Pick +} +declare module "Object/Keys" { +>"Object/Keys" : typeof import("Object/Keys") + + import { Keys as UKeys } from "Union/Keys"; +>Keys : any +>UKeys : any + + export type Keys = UKeys; +>Keys : Keys +} +declare module "Object/Omit" { +>"Object/Omit" : typeof import("Object/Omit") + + import { _Pick } from "Object/Pick"; +>_Pick : any + + import { Exclude } from "Union/Exclude"; +>Exclude : any + + import { Key } from "Any/Key"; +>Key : any + + import { Keys } from "Object/Keys"; +>Keys : any + + export type _Omit = _Pick, K>>; +>_Omit : _Omit + + export type Omit = O extends unknown ? _Omit : never; +>Omit : Omit +} +declare module "Object/At" { +>"Object/At" : typeof import("Object/At") + + import { Key } from "Any/Key"; +>Key : any + + import { Boolean } from "Boolean/Boolean"; +>Boolean : any + + type AtStrict = [K & keyof O] extends [never] ? never : O[K & keyof O]; +>AtStrict : AtStrict + + type AtLoose = O extends unknown ? AtStrict : never; +>AtLoose : AtLoose + + export type At = { +>At : At + + 1: AtStrict; +>1 : AtStrict + + 0: AtLoose; +>0 : AtLoose + + }[strict]; +} +declare module "Boolean/Boolean" { +>"Boolean/Boolean" : typeof import("Boolean/Boolean") + + export type Boolean = True | False; +>Boolean : Boolean + + export type True = 1; +>True : 1 + + export type False = 0; +>False : 0 +} +declare module "Boolean/Not" { +>"Boolean/Not" : typeof import("Boolean/Not") + + import { Boolean } from "Boolean/Boolean"; +>Boolean : any + + export type Not = { +>Not : Not + + 0: 1; +>0 : 1 + + 1: 0; +>1 : 0 + + }[B]; +} +declare module "Union/Has" { +>"Union/Has" : typeof import("Union/Has") + + import { Union } from "Union/Union"; +>Union : any + + import { Not } from "Boolean/Not"; +>Not : any + + import { Extends } from "Any/Extends"; +>Extends : any + + export type Has = Not, U1>>; +>Has : Has +} +declare module "Union/Union" { +>"Union/Union" : typeof import("Union/Union") + + export type Union = any; +>Union : any +} +declare module "Union/Exclude" { +>"Union/Exclude" : typeof import("Union/Exclude") + + import { Union } from "Union/Union"; +>Union : any + + export type Exclude = U extends M ? never : U; +>Exclude : Exclude +} +declare module "Any/_Internal" { +>"Any/_Internal" : typeof import("Any/_Internal") + + import { _NumberOf } from "Number/NumberOf"; +>_NumberOf : any + + export type Match = 'default' | 'implements->' | '<-implements' | 'extends->' | '<-extends' | 'equals'; +>Match : Match + + export type NumberOf = N extends number ? _NumberOf : N; +>NumberOf : NumberOf +} +declare module "Any/Implements" { +>"Any/Implements" : typeof import("Any/Implements") + + import { Extends } from "Any/Extends"; +>Extends : any + + export type Implements = Extends extends 1 ? 1 : 0; +>Implements : Implements +} +declare module "Any/Key" { +>"Any/Key" : typeof import("Any/Key") + + export type Key = string | number | symbol; +>Key : Key +} +declare module "Union/Keys" { +>"Union/Keys" : typeof import("Union/Keys") + + import { Union } from "Union/Union"; +>Union : any + + import { Key } from "Any/Key"; +>Key : any + + export type Keys = (U extends unknown ? keyof U : never) & Key; +>Keys : Keys +} +declare module "List/ObjectOf" { +>"List/ObjectOf" : typeof import("List/ObjectOf") + + import { _Omit } from "Object/Omit"; +>_Omit : any + + import { Has } from "Union/Has"; +>Has : any + + import { At } from "Object/At"; +>At : any + + import { List } from "List/List"; +>List : any + + export type _ObjectOf = Has extends 1 ? number extends At ? _Omit> : _Omit : L; +>_ObjectOf : _ObjectOf + + export type ObjectOf = L extends unknown ? _ObjectOf : never; +>ObjectOf : ObjectOf +} +declare module "List/Keys" { +>"List/Keys" : typeof import("List/Keys") + + import { Exclude } from "Union/Exclude"; +>Exclude : any + + import { List } from "List/List"; +>List : any + + import { Keys as UKeys } from "Union/Keys"; +>Keys : any +>UKeys : any + + export type Keys = Exclude, keyof any[]> | number; +>Keys : Keys +} +declare module "Object/Merge" { +>"Object/Merge" : typeof import("Object/Merge") + + import { _Omit } from "Object/Omit"; +>_Omit : any + + import { At } from "Object/At"; +>At : any + + import { Compute } from "Any/Compute"; +>Compute : any + + import { Depth } from "Object/_Internal"; +>Depth : any + + import { Kind } from "Any/Kind"; +>Kind : any + + export type MergeFlat = Compute>; +>MergeFlat : MergeFlat + + export type MergeDeep = (Kind<(O | O1)> extends 'object' ? MergeFlat extends infer M ? { +>MergeDeep : MergeDeep + + [K in keyof M]: MergeDeep>; + } & {} : never : O); + + export type Merge = { +>Merge : Merge + + 'flat': MergeFlat; +>'flat' : Compute> + + 'deep': MergeDeep; +>'deep' : MergeDeep + + }[depth]; +} +declare module "Union/NonNullable" { +>"Union/NonNullable" : typeof import("Union/NonNullable") + + import { Exclude } from "Union/Exclude"; +>Exclude : any + + import { Union } from "Union/Union"; +>Union : any + + export type NonNullable = Exclude; +>NonNullable : NonNullable +>null : null +} +declare module "Object/ListOf" { +>"Object/ListOf" : typeof import("Object/ListOf") + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : any + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Cast } from "Any/Cast"; +>Cast : any + + import { Key } from "Iteration/Key"; +>Key : any + + import { Next } from "Iteration/Next"; +>Next : any + + import { _Append } from "List/Append"; +>_Append : any + + import { Exclude } from "Union/Exclude"; +>Exclude : any + + import { List } from "List/List"; +>List : any + + import { Extends } from "Any/Extends"; +>Extends : any + + type PickIfEntry = Key extends keyof O ? _Append, keyof O>]> : LN; +>PickIfEntry : PickIfEntry + + type __ListOf> = { +>__ListOf : __ListOf + + 0: __ListOf>, PickIfEntry, Next>; +>0 : __ListOf, PickIfEntry, Next> + + 1: LN; +>1 : LN + + }[Extends<[K], [never]>]; + + export type _ListOf = __ListOf extends infer X ? Cast : never; +>_ListOf : _ListOf + + export type ListOf = O extends unknown ? _ListOf : never; +>ListOf : ListOf +} +declare module "Object/NonNullable" { +>"Object/NonNullable" : typeof import("Object/NonNullable") + + import { MergeFlat } from "Object/Merge"; +>MergeFlat : any + + import { NonNullable as UNonNullable } from "Union/NonNullable"; +>NonNullable : any +>UNonNullable : any + + import { Depth } from "Object/_Internal"; +>Depth : any + + import { Pick } from "Object/Pick"; +>Pick : any + + import { Key } from "Any/Key"; +>Key : any + + import { Implements } from "Any/Implements"; +>Implements : any + + import { Keys } from "Object/Keys"; +>Keys : any + + export type NonNullableFlat = { +>NonNullableFlat : { [K in keyof O]: import("Union/Exclude").Exclude; } + + [K in keyof O]: UNonNullable; + } & {}; + + export type NonNullableDeep = { +>NonNullableDeep : NonNullableDeep + + [K in keyof O]: NonNullableDeep>; + }; + + type NonNullablePart = { +>NonNullablePart : NonNullablePart + + 'flat': NonNullableFlat; +>'flat' : { [K in keyof O]: import("Union/Exclude").Exclude; } + + 'deep': NonNullableDeep; +>'deep' : NonNullableDeep + + }[depth]; + + export type NonNullable = { +>NonNullable : NonNullable + + 1: NonNullablePart; +>1 : NonNullablePart + + 0: MergeFlat, depth>, O>; +>0 : import("Any/Compute").Compute, depth> & import("Object/Omit")._Omit, depth>>> + + }[Implements, K>] & {}; +} +declare module "Object/Overwrite" { +>"Object/Overwrite" : typeof import("Object/Overwrite") + + export type Overwrite = { +>Overwrite : { [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; } + + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; +} +declare module "Number/_Internal" { +>"Number/_Internal" : typeof import("Number/_Internal") + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : any + + import { Format } from "Iteration/Format"; +>Format : any + + export type Formats = 'b' | 'n' | 's'; +>Formats : Formats + + type KnownIterationMapKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; +>KnownIterationMapKeys : KnownIterationMapKeys + + type PositiveIterationKeys = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; +>PositiveIterationKeys : PositiveIterationKeys + + type NegativeIterationKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1'; +>NegativeIterationKeys : NegativeIterationKeys + + export type Numbers = { +>Numbers : Numbers + + 'string': { +>'string' : { all: Format; '+': Format; '-': Format; '0': Format; } + + 'all': Format; +>'all' : "-40" | "-39" | "-38" | "-37" | "-36" | "-35" | "-34" | "-33" | "-32" | "-31" | "-30" | "-29" | "-28" | "-27" | "-26" | "-25" | "-24" | "-23" | "-22" | "-21" | "-20" | "-19" | "-18" | "-17" | "-16" | "-15" | "-14" | "-13" | "-12" | "-11" | "-10" | "-9" | "-8" | "-7" | "-6" | "-5" | "-4" | "-3" | "-2" | "-1" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" + + '+': Format; +>'+' : "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" + + '-': Format; +>'-' : "-40" | "-39" | "-38" | "-37" | "-36" | "-35" | "-34" | "-33" | "-32" | "-31" | "-30" | "-29" | "-28" | "-27" | "-26" | "-25" | "-24" | "-23" | "-22" | "-21" | "-20" | "-19" | "-18" | "-17" | "-16" | "-15" | "-14" | "-13" | "-12" | "-11" | "-10" | "-9" | "-8" | "-7" | "-6" | "-5" | "-4" | "-3" | "-2" | "-1" + + '0': Format; +>'0' : "0" + + }; + 'number': { +>'number' : { all: Format; '+': Format; '-': Format; '0': Format; } + + 'all': Format; +>'all' : 0 | 1 | 3 | 5 | 40 | -40 | 39 | -39 | 38 | -38 | 37 | -37 | 36 | -36 | 35 | -35 | 34 | -34 | 33 | -33 | 32 | -32 | 31 | -31 | 30 | -30 | 29 | -29 | 28 | -28 | 27 | -27 | 26 | -26 | 25 | -25 | 24 | -24 | 23 | -23 | 22 | -22 | 21 | -21 | 20 | -20 | 19 | -19 | 18 | -18 | 17 | -17 | 16 | -16 | 15 | -15 | 14 | -14 | 13 | -13 | 12 | -12 | 11 | -11 | 10 | -10 | 9 | -9 | 8 | -8 | 7 | -7 | 6 | -6 | -5 | 4 | -4 | -3 | 2 | -2 | -1 + + '+': Format; +>'+' : 1 | 3 | 5 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 4 | 2 + + '-': Format; +>'-' : -40 | -39 | -38 | -37 | -36 | -35 | -34 | -33 | -32 | -31 | -30 | -29 | -28 | -27 | -26 | -25 | -24 | -23 | -22 | -21 | -20 | -19 | -18 | -17 | -16 | -15 | -14 | -13 | -12 | -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 + + '0': Format; +>'0' : 0 + + }; + }; +} +declare module "Number/Number" { +>"Number/Number" : typeof import("Number/Number") + + export type Number = string; +>Number : string +} +declare module "Iteration/_Internal" { +>"Iteration/_Internal" : typeof import("Iteration/_Internal") + + export type Formats = 'n' | 's'; +>Formats : Formats + + export type Way = '->' | '<-'; +>Way : Way +} +declare module "List/Prepend" { +>"List/Prepend" : typeof import("List/Prepend") + + import { List } from "List/List"; +>List : any + + export type Prepend = ((head: A, ...args: L) => any) extends ((...args: infer U) => any) ? U : L; +>Prepend : [head: A, ...args: L] +>head : A +>args : L +>args : U +} +declare module "List/_Internal" { +>"List/_Internal" : typeof import("List/_Internal") + + import { Overwrite } from "Object/Overwrite"; +>Overwrite : any + + import { List } from "List/List"; +>List : any + + export type Naked = Overwrite, L>; +>Naked : { [K in keyof Required]: K extends keyof L ? L[K] : Required[K]; } +} +declare module "List/Tail" { +>"List/Tail" : typeof import("List/Tail") + + import { List } from "List/List"; +>List : any + + export type Tail = ((...t: L) => any) extends ((head: any, ...tail: infer LTail) => any) ? LTail : never; +>Tail : Tail +>t : L +>head : any +>tail : LTail +} +declare module "Iteration/Format" { +>"Iteration/Format" : typeof import("Iteration/Format") + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Formats } from "Iteration/_Internal"; +>Formats : any + + export type Format = { +>Format : Format + + 's': I[2]; +>'s' : I[2] + + 'n': I[3]; +>'n' : I[3] + + }[fmt]; +} +declare module "Iteration/Pos" { +>"Iteration/Pos" : typeof import("Iteration/Pos") + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Format } from "Iteration/Format"; +>Format : any + + export type Pos = Format; +>Pos : I[3] +} +declare module "List/Append" { +>"List/Append" : typeof import("List/Append") + + import { _Concat } from "List/Concat"; +>_Concat : any + + import { List } from "List/List"; +>List : any + + export type _Append = _Concat; +>_Append : _Append + + export type Append = L extends unknown ? A extends unknown ? _Append : never : never; +>Append : Append +} +declare module "List/Reverse" { +>"List/Reverse" : typeof import("List/Reverse") + + import { Prepend } from "List/Prepend"; +>Prepend : any + + import { Pos } from "Iteration/Pos"; +>Pos : any + + import { Next } from "Iteration/Next"; +>Next : any + + import { Length } from "List/Length"; +>Length : any + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : any + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Cast } from "Any/Cast"; +>Cast : any + + import { List } from "List/List"; +>List : any + + import { Naked } from "List/_Internal"; +>Naked : any + + import { Extends } from "Any/Extends"; +>Extends : any + + type __Reverse> = { +>__Reverse : __Reverse + + 0: __Reverse]>, Next>; +>0 : __Reverse> + + 1: LO; +>1 : LO + + }[Extends, Length>]; + + export type _Reverse = __Reverse, LO> extends infer X ? Cast : never; +>_Reverse : _Reverse + + export type Reverse = L extends unknown ? LO extends unknown ? _Reverse : never : never; +>Reverse : Reverse +} +declare module "List/Concat" { +>"List/Concat" : typeof import("List/Concat") + + import { _Reverse } from "List/Reverse"; +>_Reverse : any + + import { List } from "List/List"; +>List : any + + export type _Concat = _Reverse<_Reverse, L1>; +>_Concat : _Concat + + export type Concat = L extends unknown ? L1 extends L1 ? _Concat : never : never; +>Concat : Concat +} +declare module "List/Drop" { +>"List/Drop" : typeof import("List/Drop") + + import { Tail } from "List/Tail"; +>Tail : any + + import { Cast } from "Any/Cast"; +>Cast : any + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : any + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Number } from "Number/Number"; +>Number : any + + import { Way } from "Iteration/_Internal"; +>Way : any + + import { List } from "List/List"; +>List : any + + import { Pos } from "Iteration/Pos"; +>Pos : any + + import { Prev } from "Iteration/Prev"; +>Prev : any + + import { Prepend } from "List/Prepend"; +>Prepend : any + + import { Naked } from "List/_Internal"; +>Naked : any + + import { Extends } from "Any/Extends"; +>Extends : any + + type DropForth = { +>DropForth : DropForth + + 0: DropForth, Prev>; +>0 : DropForth, Prev> + + 1: L; +>1 : L + + }[Extends<0, Pos>]; + + type DropBack, LN extends List = []> = { +>DropBack : DropBack + + 0: DropBack, Prepend]>>; +>0 : DropBack, [head: L[I[3]], ...args: LN]> + + 1: LN; +>1 : LN + + }[Extends<-1, Pos>]; +>-1 : -1 +>1 : 1 + + type __Drop = { +>__Drop : __Drop + + '->': DropForth; +>'->' : DropForth + + '<-': DropBack; +>'<-' : DropBack, []> + + }[way]; + + export type _Drop = __Drop, IterationOf, way> extends infer X ? Cast : never; +>_Drop : _Drop + + export type Drop = L extends unknown ? N extends unknown ? _Drop : never : never; +>Drop : Drop +} +declare module "List/Length" { +>"List/Length" : typeof import("List/Length") + + import { NumberOf } from "Number/NumberOf"; +>NumberOf : any + + import { Formats } from "Iteration/_Internal"; +>Formats : any + + import { List } from "List/List"; +>List : any + + export type Length = { +>Length : Length + + 's': NumberOf; +>'s' : NumberOf + + 'n': L['length']; +>'n' : L["length"] + + }[fmt]; +} +declare module "Iteration/Next" { +>"Iteration/Next" : typeof import("Iteration/Next") + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : any + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + export type Next = IterationMap[I[1]]; +>Next : Next +} +declare module "Any/Cast" { +>"Any/Cast" : typeof import("Any/Cast") + + export type Cast = A1 extends A2 ? A1 : A2; +>Cast : Cast +} +declare module "Function/Parameters" { +>"Function/Parameters" : typeof import("Function/Parameters") + + import { Function } from "Function/Function"; +>Function : any + + export type Parameters = F extends ((...args: infer L) => any) ? L : never; +>Parameters : Parameters +>args : L +} +declare module "Function/Return" { +>"Function/Return" : typeof import("Function/Return") + + import { Function } from "Function/Function"; +>Function : any + + export type Return = F extends ((...args: any[]) => infer R) ? R : never; +>Return : Return +>args : any[] +} +declare module "Iteration/Prev" { +>"Iteration/Prev" : typeof import("Iteration/Prev") + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : any + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + export type Prev = IterationMap[I[0]]; +>Prev : Prev +} +declare module "Number/NumberOf" { +>"Number/NumberOf" : typeof import("Number/NumberOf") + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : any + + import { Key } from "Iteration/Key"; +>Key : any + + import { Pos } from "Iteration/Pos"; +>Pos : any + + import { Numbers } from "Number/_Internal"; +>Numbers : any + + export type _NumberOf = { +>_NumberOf : _NumberOf + + [K in keyof IterationMap]: Pos extends N ? Key : never; + }[keyof IterationMap]; + + export type NumberOf = N extends Numbers['number']['all'] ? _NumberOf : string; +>NumberOf : NumberOf +} +declare module "Object/_Internal" { +>"Object/_Internal" : typeof import("Object/_Internal") + + export type Modx = ['?' | '!', 'W' | 'R']; +>Modx : Modx + + export type Depth = 'flat' | 'deep'; +>Depth : Depth + + export type Empty = { +>Empty : Empty + + [K in keyof O]: undefined; + }; +} +declare module "Iteration/IterationOf" { +>"Iteration/IterationOf" : typeof import("Iteration/IterationOf") + + import { Number } from "Number/Number"; +>Number : any + + export type IterationMap = { +>IterationMap : IterationMap + + '-40': ['__', '-39', '-40', -40, '-']; +>'-40' : ["__", "-39", "-40", -40, "-"] +>-40 : -40 +>40 : 40 + + '-39': ['-40', '-38', '-39', -39, '-']; +>'-39' : ["-40", "-38", "-39", -39, "-"] +>-39 : -39 +>39 : 39 + + '-38': ['-39', '-37', '-38', -38, '-']; +>'-38' : ["-39", "-37", "-38", -38, "-"] +>-38 : -38 +>38 : 38 + + '-37': ['-38', '-36', '-37', -37, '-']; +>'-37' : ["-38", "-36", "-37", -37, "-"] +>-37 : -37 +>37 : 37 + + '-36': ['-37', '-35', '-36', -36, '-']; +>'-36' : ["-37", "-35", "-36", -36, "-"] +>-36 : -36 +>36 : 36 + + '-35': ['-36', '-34', '-35', -35, '-']; +>'-35' : ["-36", "-34", "-35", -35, "-"] +>-35 : -35 +>35 : 35 + + '-34': ['-35', '-33', '-34', -34, '-']; +>'-34' : ["-35", "-33", "-34", -34, "-"] +>-34 : -34 +>34 : 34 + + '-33': ['-34', '-32', '-33', -33, '-']; +>'-33' : ["-34", "-32", "-33", -33, "-"] +>-33 : -33 +>33 : 33 + + '-32': ['-33', '-31', '-32', -32, '-']; +>'-32' : ["-33", "-31", "-32", -32, "-"] +>-32 : -32 +>32 : 32 + + '-31': ['-32', '-30', '-31', -31, '-']; +>'-31' : ["-32", "-30", "-31", -31, "-"] +>-31 : -31 +>31 : 31 + + '-30': ['-31', '-29', '-30', -30, '-']; +>'-30' : ["-31", "-29", "-30", -30, "-"] +>-30 : -30 +>30 : 30 + + '-29': ['-30', '-28', '-29', -29, '-']; +>'-29' : ["-30", "-28", "-29", -29, "-"] +>-29 : -29 +>29 : 29 + + '-28': ['-29', '-27', '-28', -28, '-']; +>'-28' : ["-29", "-27", "-28", -28, "-"] +>-28 : -28 +>28 : 28 + + '-27': ['-28', '-26', '-27', -27, '-']; +>'-27' : ["-28", "-26", "-27", -27, "-"] +>-27 : -27 +>27 : 27 + + '-26': ['-27', '-25', '-26', -26, '-']; +>'-26' : ["-27", "-25", "-26", -26, "-"] +>-26 : -26 +>26 : 26 + + '-25': ['-26', '-24', '-25', -25, '-']; +>'-25' : ["-26", "-24", "-25", -25, "-"] +>-25 : -25 +>25 : 25 + + '-24': ['-25', '-23', '-24', -24, '-']; +>'-24' : ["-25", "-23", "-24", -24, "-"] +>-24 : -24 +>24 : 24 + + '-23': ['-24', '-22', '-23', -23, '-']; +>'-23' : ["-24", "-22", "-23", -23, "-"] +>-23 : -23 +>23 : 23 + + '-22': ['-23', '-21', '-22', -22, '-']; +>'-22' : ["-23", "-21", "-22", -22, "-"] +>-22 : -22 +>22 : 22 + + '-21': ['-22', '-20', '-21', -21, '-']; +>'-21' : ["-22", "-20", "-21", -21, "-"] +>-21 : -21 +>21 : 21 + + '-20': ['-21', '-19', '-20', -20, '-']; +>'-20' : ["-21", "-19", "-20", -20, "-"] +>-20 : -20 +>20 : 20 + + '-19': ['-20', '-18', '-19', -19, '-']; +>'-19' : ["-20", "-18", "-19", -19, "-"] +>-19 : -19 +>19 : 19 + + '-18': ['-19', '-17', '-18', -18, '-']; +>'-18' : ["-19", "-17", "-18", -18, "-"] +>-18 : -18 +>18 : 18 + + '-17': ['-18', '-16', '-17', -17, '-']; +>'-17' : ["-18", "-16", "-17", -17, "-"] +>-17 : -17 +>17 : 17 + + '-16': ['-17', '-15', '-16', -16, '-']; +>'-16' : ["-17", "-15", "-16", -16, "-"] +>-16 : -16 +>16 : 16 + + '-15': ['-16', '-14', '-15', -15, '-']; +>'-15' : ["-16", "-14", "-15", -15, "-"] +>-15 : -15 +>15 : 15 + + '-14': ['-15', '-13', '-14', -14, '-']; +>'-14' : ["-15", "-13", "-14", -14, "-"] +>-14 : -14 +>14 : 14 + + '-13': ['-14', '-12', '-13', -13, '-']; +>'-13' : ["-14", "-12", "-13", -13, "-"] +>-13 : -13 +>13 : 13 + + '-12': ['-13', '-11', '-12', -12, '-']; +>'-12' : ["-13", "-11", "-12", -12, "-"] +>-12 : -12 +>12 : 12 + + '-11': ['-12', '-10', '-11', -11, '-']; +>'-11' : ["-12", "-10", "-11", -11, "-"] +>-11 : -11 +>11 : 11 + + '-10': ['-11', '-9', '-10', -10, '-']; +>'-10' : ["-11", "-9", "-10", -10, "-"] +>-10 : -10 +>10 : 10 + + '-9': ['-10', '-8', '-9', -9, '-']; +>'-9' : ["-10", "-8", "-9", -9, "-"] +>-9 : -9 +>9 : 9 + + '-8': ['-9', '-7', '-8', -8, '-']; +>'-8' : ["-9", "-7", "-8", -8, "-"] +>-8 : -8 +>8 : 8 + + '-7': ['-8', '-6', '-7', -7, '-']; +>'-7' : ["-8", "-6", "-7", -7, "-"] +>-7 : -7 +>7 : 7 + + '-6': ['-7', '-5', '-6', -6, '-']; +>'-6' : ["-7", "-5", "-6", -6, "-"] +>-6 : -6 +>6 : 6 + + '-5': ['-6', '-4', '-5', -5, '-']; +>'-5' : ["-6", "-4", "-5", -5, "-"] +>-5 : -5 +>5 : 5 + + '-4': ['-5', '-3', '-4', -4, '-']; +>'-4' : ["-5", "-3", "-4", -4, "-"] +>-4 : -4 +>4 : 4 + + '-3': ['-4', '-2', '-3', -3, '-']; +>'-3' : ["-4", "-2", "-3", -3, "-"] +>-3 : -3 +>3 : 3 + + '-2': ['-3', '-1', '-2', -2, '-']; +>'-2' : ["-3", "-1", "-2", -2, "-"] +>-2 : -2 +>2 : 2 + + '-1': ['-2', '0', '-1', -1, '-']; +>'-1' : ["-2", "0", "-1", -1, "-"] +>-1 : -1 +>1 : 1 + + '0': ['-1', '1', '0', 0, '0']; +>'0' : ["-1", "1", "0", 0, "0"] + + '1': ['0', '2', '1', 1, '+']; +>'1' : ["0", "2", "1", 1, "+"] + + '2': ['1', '3', '2', 2, '+']; +>'2' : ["1", "3", "2", 2, "+"] + + '3': ['2', '4', '3', 3, '+']; +>'3' : ["2", "4", "3", 3, "+"] + + '4': ['3', '5', '4', 4, '+']; +>'4' : ["3", "5", "4", 4, "+"] + + '5': ['4', '6', '5', 5, '+']; +>'5' : ["4", "6", "5", 5, "+"] + + '6': ['5', '7', '6', 6, '+']; +>'6' : ["5", "7", "6", 6, "+"] + + '7': ['6', '8', '7', 7, '+']; +>'7' : ["6", "8", "7", 7, "+"] + + '8': ['7', '9', '8', 8, '+']; +>'8' : ["7", "9", "8", 8, "+"] + + '9': ['8', '10', '9', 9, '+']; +>'9' : ["8", "10", "9", 9, "+"] + + '10': ['9', '11', '10', 10, '+']; +>'10' : ["9", "11", "10", 10, "+"] + + '11': ['10', '12', '11', 11, '+']; +>'11' : ["10", "12", "11", 11, "+"] + + '12': ['11', '13', '12', 12, '+']; +>'12' : ["11", "13", "12", 12, "+"] + + '13': ['12', '14', '13', 13, '+']; +>'13' : ["12", "14", "13", 13, "+"] + + '14': ['13', '15', '14', 14, '+']; +>'14' : ["13", "15", "14", 14, "+"] + + '15': ['14', '16', '15', 15, '+']; +>'15' : ["14", "16", "15", 15, "+"] + + '16': ['15', '17', '16', 16, '+']; +>'16' : ["15", "17", "16", 16, "+"] + + '17': ['16', '18', '17', 17, '+']; +>'17' : ["16", "18", "17", 17, "+"] + + '18': ['17', '19', '18', 18, '+']; +>'18' : ["17", "19", "18", 18, "+"] + + '19': ['18', '20', '19', 19, '+']; +>'19' : ["18", "20", "19", 19, "+"] + + '20': ['19', '21', '20', 20, '+']; +>'20' : ["19", "21", "20", 20, "+"] + + '21': ['20', '22', '21', 21, '+']; +>'21' : ["20", "22", "21", 21, "+"] + + '22': ['21', '23', '22', 22, '+']; +>'22' : ["21", "23", "22", 22, "+"] + + '23': ['22', '24', '23', 23, '+']; +>'23' : ["22", "24", "23", 23, "+"] + + '24': ['23', '25', '24', 24, '+']; +>'24' : ["23", "25", "24", 24, "+"] + + '25': ['24', '26', '25', 25, '+']; +>'25' : ["24", "26", "25", 25, "+"] + + '26': ['25', '27', '26', 26, '+']; +>'26' : ["25", "27", "26", 26, "+"] + + '27': ['26', '28', '27', 27, '+']; +>'27' : ["26", "28", "27", 27, "+"] + + '28': ['27', '29', '28', 28, '+']; +>'28' : ["27", "29", "28", 28, "+"] + + '29': ['28', '30', '29', 29, '+']; +>'29' : ["28", "30", "29", 29, "+"] + + '30': ['29', '31', '30', 30, '+']; +>'30' : ["29", "31", "30", 30, "+"] + + '31': ['30', '32', '31', 31, '+']; +>'31' : ["30", "32", "31", 31, "+"] + + '32': ['31', '33', '32', 32, '+']; +>'32' : ["31", "33", "32", 32, "+"] + + '33': ['32', '34', '33', 33, '+']; +>'33' : ["32", "34", "33", 33, "+"] + + '34': ['33', '35', '34', 34, '+']; +>'34' : ["33", "35", "34", 34, "+"] + + '35': ['34', '36', '35', 35, '+']; +>'35' : ["34", "36", "35", 35, "+"] + + '36': ['35', '37', '36', 36, '+']; +>'36' : ["35", "37", "36", 36, "+"] + + '37': ['36', '38', '37', 37, '+']; +>'37' : ["36", "38", "37", 37, "+"] + + '38': ['37', '39', '38', 38, '+']; +>'38' : ["37", "39", "38", 38, "+"] + + '39': ['38', '40', '39', 39, '+']; +>'39' : ["38", "40", "39", 39, "+"] + + '40': ['39', '__', '40', 40, '+']; +>'40' : ["39", "__", "40", 40, "+"] + + '__': ['__', '__', string, number, '-' | '0' | '+']; +>'__' : ["__", "__", string, number, "0" | "-" | "+"] + + }; + + export type IterationOf = N extends keyof IterationMap ? IterationMap[N] : IterationMap['__']; +>IterationOf : IterationOf +} +declare module "Iteration/Iteration" { +>"Iteration/Iteration" : typeof import("Iteration/Iteration") + + import { IterationMap } from "Iteration/IterationOf"; +>IterationMap : any + + export type Iteration = [keyof IterationMap, keyof IterationMap, string, number, '-' | '0' | '+']; +>Iteration : Iteration +} +declare module "Iteration/Key" { +>"Iteration/Key" : typeof import("Iteration/Key") + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Format } from "Iteration/Format"; +>Format : any + + export type Key = Format; +>Key : I[2] +} +declare module "List/NonNullable" { +>"List/NonNullable" : typeof import("List/NonNullable") + + import { Depth } from "Object/_Internal"; +>Depth : any + + import { NonNullable as ONonNullable } from "Object/NonNullable"; +>NonNullable : any +>ONonNullable : any + + import { ListOf } from "Object/ListOf"; +>ListOf : any + + import { Cast } from "Any/Cast"; +>Cast : any + + import { Key } from "Any/Key"; +>Key : any + + import { ObjectOf } from "List/ObjectOf"; +>ObjectOf : any + + import { Implements } from "Any/Implements"; +>Implements : any + + import { Keys } from "List/Keys"; +>Keys : any + + import { List } from "List/List"; +>List : any + + import { NumberOf } from "Any/_Internal"; +>NumberOf : any + + export type NonNullable = { +>NonNullable : NonNullable + + 1: Cast, List>; +>1 : Cast, List> + + 0: ListOf, NumberOf, depth>>; +>0 : ListOf, NumberOf, depth>> + + }[Implements, K>] & {}; +} +declare module "Any/Type" { +>"Any/Type" : typeof import("Any/Type") + + const symbol: unique symbol; +>symbol : unique symbol + + export type Type = A & { +>Type : Type + + [K in typeof symbol]: Id; +>symbol : unique symbol + + }; +} +declare module "Any/x" { +>"Any/x" : typeof import("Any/x") + + import { Type } from "Any/Type"; +>Type : any + + export type x = Type<{}, 'x'>; +>x : { [symbol]: "x"; } +} +declare module "List/List" { +>"List/List" : typeof import("List/List") + + export type List = ReadonlyArray; +>List : List +} +declare module "Function/Function" { +>"Function/Function" : typeof import("Function/Function") + + import { List } from "List/List"; +>List : any + + export interface Function

{ + (...args: P): R; +>args : P + } +} +declare module "Any/Extends" { +>"Any/Extends" : typeof import("Any/Extends") + + export type Extends = [A1] extends [never] ? 0 : A1 extends A2 ? 1 : 0; +>Extends : Extends +} + +declare module "Function/Curry" { +>"Function/Curry" : typeof import("Function/Curry") + + import { Pos } from "Iteration/Pos"; +>Pos : any + + import { _Append } from "List/Append"; +>_Append : any + + import { _Concat } from "List/Concat"; +>_Concat : any + + import { _Drop } from "List/Drop"; +>_Drop : any + + import { Length } from "List/Length"; +>Length : any + + import { Next } from "Iteration/Next"; +>Next : any + + import { Cast } from "Any/Cast"; +>Cast : any + + import { Parameters } from "Function/Parameters"; +>Parameters : any + + import { Return } from "Function/Return"; +>Return : any + + import { IterationOf } from "Iteration/IterationOf"; +>IterationOf : any + + import { Iteration } from "Iteration/Iteration"; +>Iteration : any + + import { Key } from "Iteration/Key"; +>Key : any + + import { NonNullable } from "List/NonNullable"; +>NonNullable : any + + import { x } from "Any/x"; +>x : any + + import { List } from "List/List"; +>List : any + + import { Function } from "Function/Function"; +>Function : any + + import { Extends } from "Any/Extends"; +>Extends : any + + type GapOf> = L1[Pos] extends x ? _Append]> : LN; +>GapOf : GapOf + + type _GapsOf> = { +>_GapsOf : _GapsOf + + 0: _GapsOf, Next>; +>0 : _GapsOf, Next> + + 1: _Concat>>; +>1 : import("List/Reverse")._Reverse, _Drop">> + + }[Extends, Length>]; + + type GapsOf = _GapsOf extends infer X ? Cast : never; +>GapsOf : GapsOf + + type Gaps = NonNullable<{ +>Gaps : Gaps + + [K in keyof L]?: L[K] | x; + }>; + + export type Curry = (...args: Cast>>) => GapsOf> extends infer G ? Length> extends infer L ? L extends 0 ? Return : L extends 1 ? Curry<(...args: Cast) => Return> & ((...args: Cast) => Return) : Curry<(...args: Cast) => Return> : never : never; +>Curry : Curry +>args : Cast>> +>args : Cast> +>args : Cast> +>args : Cast> +} + + + diff --git a/tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts b/tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts new file mode 100644 index 0000000000000..bd953ac94d23b --- /dev/null +++ b/tests/cases/compiler/conditionalTypeAssignabilityWhenDeferred.ts @@ -0,0 +1,118 @@ +// @strict: true +export type FilterPropsByType = { + [K in keyof T]: T[K] extends TT ? K : never +}[keyof T]; + +function select< + T extends string | number, + TList extends object, + TValueProp extends FilterPropsByType +>(property: T, list: TList[], valueProp: TValueProp) {} + +export function func(x: XX, tipos: { value: XX }[]) { + select(x, tipos, "value"); +} + +declare function onlyNullablePlease( + value: T +): void; + +declare function onlyNullablePlease2< + T extends [null] extends [T] ? any : never +>(value: T): void; + +declare var z: string | null; +onlyNullablePlease(z); // works as expected +onlyNullablePlease2(z); // works as expected + +declare var y: string; +onlyNullablePlease(y); // error as expected +onlyNullablePlease2(y); // error as expected + +function f(t: T) { + var x: T | null = Math.random() > 0.5 ? null : t; + onlyNullablePlease(x); // should work + onlyNullablePlease2(x); // should work +} + +function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) { + t1 = t2; // OK + t2 = t1; // should fail +} + +type Foo = T extends true ? string : "a"; + +function test(x: Foo, s: string) { + x = "a"; // Currently an error, should be ok + x = s; // Error +} + +// #26933 +type Distributive = T extends { a: number } ? { a: number } : { b: number }; +function testAssignabilityToConditionalType() { + const o = { a: 1, b: 2 }; + const x: [T] extends [string] + ? { y: number } + : { a: number; b: number } = undefined!; + // Simple case: OK + const o1: [T] extends [number] ? { a: number } : { b: number } = o; + // Simple case where source happens to be a conditional type: also OK + const x1: [T] extends [number] + ? ([T] extends [string] ? { y: number } : { a: number }) + : ([T] extends [string] ? { y: number } : { b: number }) = x; + // Infer type parameters: no good + const o2: [T] extends [[infer U]] ? U : { b: number } = o; + + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. + // There's an argument for the result of dumping `never` into a distributive conditional + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + + // Distributive where T might instantiate to never: no good + const o3: Distributive = o; + // Distributive where T & string might instantiate to never: also no good + const o4: Distributive = o; + // Distributive where {a: T} cannot instantiate to never: OK + const o5: Distributive<{ a: T }> = o; + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good + const o6: Distributive<[T] extends [never] ? { a: number } : never> = o; +} + +type Wrapped = { ___secret: T }; +type Unwrap = T extends Wrapped ? U : T; + +declare function set( + obj: T, + key: K, + value: Unwrap +): Unwrap; + +class Foo2 { + prop!: Wrapped; + + method() { + set(this, "prop", "hi"); // <-- type error + } +} + +set(new Foo2(), "prop", "hi"); // <-- typechecks + +type InferBecauseWhyNot = [T] extends [(p: infer P1) => any] + ? P1 | T + : never; + +function f3 any>(x: Q): InferBecauseWhyNot { + return x; +} + +type InferBecauseWhyNotDistributive = T extends (p: infer P1) => any + ? P1 | T + : never; + +function f4 any>( + x: Q +): InferBecauseWhyNotDistributive { + return x; // should fail +} diff --git a/tests/cases/compiler/conditionalTypeSubclassExtendsTypeParam.ts b/tests/cases/compiler/conditionalTypeSubclassExtendsTypeParam.ts new file mode 100644 index 0000000000000..31bd6c6b81818 --- /dev/null +++ b/tests/cases/compiler/conditionalTypeSubclassExtendsTypeParam.ts @@ -0,0 +1,6 @@ +declare class Model { + public getField2(): Field +} + +declare class Field { +} \ No newline at end of file diff --git a/tests/cases/compiler/ramdaToolsNoInfinite2.ts b/tests/cases/compiler/ramdaToolsNoInfinite2.ts new file mode 100644 index 0000000000000..3440485832877 --- /dev/null +++ b/tests/cases/compiler/ramdaToolsNoInfinite2.ts @@ -0,0 +1,568 @@ +// @strict: true +declare module "Any/Kind" { + import { Extends } from "Any/Extends"; + import { List } from "List/List"; + + export type Kind = Extends extends 1 ? 'function' : Extends extends 1 ? 'array' : Extends extends 1 ? 'object' : Extends extends 1 ? 'string' : Extends extends 1 ? 'number' : Extends extends 1 ? 'boolean' : 'unknown'; +} +declare module "Any/Compute" { + export type Compute = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; +} +declare module "Object/Pick" { + import { Key } from "Any/Key"; + + type __Pick = { + [P in K]: O[P]; + } & {}; + + export type _Pick = __Pick; + + export type Pick = O extends unknown ? _Pick : never; +} +declare module "Object/Keys" { + import { Keys as UKeys } from "Union/Keys"; + + export type Keys = UKeys; +} +declare module "Object/Omit" { + import { _Pick } from "Object/Pick"; + import { Exclude } from "Union/Exclude"; + import { Key } from "Any/Key"; + import { Keys } from "Object/Keys"; + export type _Omit = _Pick, K>>; + + export type Omit = O extends unknown ? _Omit : never; +} +declare module "Object/At" { + import { Key } from "Any/Key"; + import { Boolean } from "Boolean/Boolean"; + + type AtStrict = [K & keyof O] extends [never] ? never : O[K & keyof O]; + + type AtLoose = O extends unknown ? AtStrict : never; + + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; +} +declare module "Boolean/Boolean" { + export type Boolean = True | False; + + export type True = 1; + + export type False = 0; +} +declare module "Boolean/Not" { + import { Boolean } from "Boolean/Boolean"; + + export type Not = { + 0: 1; + 1: 0; + }[B]; +} +declare module "Union/Has" { + import { Union } from "Union/Union"; + import { Not } from "Boolean/Not"; + import { Extends } from "Any/Extends"; + + export type Has = Not, U1>>; +} +declare module "Union/Union" { + export type Union = any; +} +declare module "Union/Exclude" { + import { Union } from "Union/Union"; + + export type Exclude = U extends M ? never : U; +} +declare module "Any/_Internal" { + import { _NumberOf } from "Number/NumberOf"; + + export type Match = 'default' | 'implements->' | '<-implements' | 'extends->' | '<-extends' | 'equals'; + + export type NumberOf = N extends number ? _NumberOf : N; +} +declare module "Any/Implements" { + import { Extends } from "Any/Extends"; + + export type Implements = Extends extends 1 ? 1 : 0; +} +declare module "Any/Key" { + export type Key = string | number | symbol; +} +declare module "Union/Keys" { + import { Union } from "Union/Union"; + import { Key } from "Any/Key"; + + export type Keys = (U extends unknown ? keyof U : never) & Key; +} +declare module "List/ObjectOf" { + import { _Omit } from "Object/Omit"; + import { Has } from "Union/Has"; + import { At } from "Object/At"; + import { List } from "List/List"; + + export type _ObjectOf = Has extends 1 ? number extends At ? _Omit> : _Omit : L; + + export type ObjectOf = L extends unknown ? _ObjectOf : never; +} +declare module "List/Keys" { + import { Exclude } from "Union/Exclude"; + import { List } from "List/List"; + import { Keys as UKeys } from "Union/Keys"; + + export type Keys = Exclude, keyof any[]> | number; +} +declare module "Object/Merge" { + import { _Omit } from "Object/Omit"; + import { At } from "Object/At"; + import { Compute } from "Any/Compute"; + import { Depth } from "Object/_Internal"; + import { Kind } from "Any/Kind"; + + export type MergeFlat = Compute>; + + export type MergeDeep = (Kind<(O | O1)> extends 'object' ? MergeFlat extends infer M ? { + [K in keyof M]: MergeDeep>; + } & {} : never : O); + + export type Merge = { + 'flat': MergeFlat; + 'deep': MergeDeep; + }[depth]; +} +declare module "Union/NonNullable" { + import { Exclude } from "Union/Exclude"; + import { Union } from "Union/Union"; + + export type NonNullable = Exclude; +} +declare module "Object/ListOf" { + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Cast } from "Any/Cast"; + import { Key } from "Iteration/Key"; + import { Next } from "Iteration/Next"; + import { _Append } from "List/Append"; + import { Exclude } from "Union/Exclude"; + import { List } from "List/List"; + import { Extends } from "Any/Extends"; + + type PickIfEntry = Key extends keyof O ? _Append, keyof O>]> : LN; + + type __ListOf> = { + 0: __ListOf>, PickIfEntry, Next>; + 1: LN; + }[Extends<[K], [never]>]; + + export type _ListOf = __ListOf extends infer X ? Cast : never; + + export type ListOf = O extends unknown ? _ListOf : never; +} +declare module "Object/NonNullable" { + import { MergeFlat } from "Object/Merge"; + import { NonNullable as UNonNullable } from "Union/NonNullable"; + import { Depth } from "Object/_Internal"; + import { Pick } from "Object/Pick"; + import { Key } from "Any/Key"; + import { Implements } from "Any/Implements"; + import { Keys } from "Object/Keys"; + + export type NonNullableFlat = { + [K in keyof O]: UNonNullable; + } & {}; + + export type NonNullableDeep = { + [K in keyof O]: NonNullableDeep>; + }; + + type NonNullablePart = { + 'flat': NonNullableFlat; + 'deep': NonNullableDeep; + }[depth]; + + export type NonNullable = { + 1: NonNullablePart; + 0: MergeFlat, depth>, O>; + }[Implements, K>] & {}; +} +declare module "Object/Overwrite" { + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; +} +declare module "Number/_Internal" { + import { IterationMap } from "Iteration/IterationOf"; + import { Format } from "Iteration/Format"; + + export type Formats = 'b' | 'n' | 's'; + + type KnownIterationMapKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; + + type PositiveIterationKeys = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40'; + + type NegativeIterationKeys = '-40' | '-39' | '-38' | '-37' | '-36' | '-35' | '-34' | '-33' | '-32' | '-31' | '-30' | '-29' | '-28' | '-27' | '-26' | '-25' | '-24' | '-23' | '-22' | '-21' | '-20' | '-19' | '-18' | '-17' | '-16' | '-15' | '-14' | '-13' | '-12' | '-11' | '-10' | '-9' | '-8' | '-7' | '-6' | '-5' | '-4' | '-3' | '-2' | '-1'; + + export type Numbers = { + 'string': { + 'all': Format; + '+': Format; + '-': Format; + '0': Format; + }; + 'number': { + 'all': Format; + '+': Format; + '-': Format; + '0': Format; + }; + }; +} +declare module "Number/Number" { + export type Number = string; +} +declare module "Iteration/_Internal" { + export type Formats = 'n' | 's'; + export type Way = '->' | '<-'; +} +declare module "List/Prepend" { + import { List } from "List/List"; + + export type Prepend = ((head: A, ...args: L) => any) extends ((...args: infer U) => any) ? U : L; +} +declare module "List/_Internal" { + import { Overwrite } from "Object/Overwrite"; + import { List } from "List/List"; + + export type Naked = Overwrite, L>; +} +declare module "List/Tail" { + import { List } from "List/List"; + + export type Tail = ((...t: L) => any) extends ((head: any, ...tail: infer LTail) => any) ? LTail : never; +} +declare module "Iteration/Format" { + import { Iteration } from "Iteration/Iteration"; + import { Formats } from "Iteration/_Internal"; + + export type Format = { + 's': I[2]; + 'n': I[3]; + }[fmt]; +} +declare module "Iteration/Pos" { + import { Iteration } from "Iteration/Iteration"; + import { Format } from "Iteration/Format"; + + export type Pos = Format; +} +declare module "List/Append" { + import { _Concat } from "List/Concat"; + import { List } from "List/List"; + + export type _Append = _Concat; + + export type Append = L extends unknown ? A extends unknown ? _Append : never : never; +} +declare module "List/Reverse" { + import { Prepend } from "List/Prepend"; + import { Pos } from "Iteration/Pos"; + import { Next } from "Iteration/Next"; + import { Length } from "List/Length"; + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Cast } from "Any/Cast"; + import { List } from "List/List"; + import { Naked } from "List/_Internal"; + import { Extends } from "Any/Extends"; + + type __Reverse> = { + 0: __Reverse]>, Next>; + 1: LO; + }[Extends, Length>]; + + export type _Reverse = __Reverse, LO> extends infer X ? Cast : never; + + export type Reverse = L extends unknown ? LO extends unknown ? _Reverse : never : never; +} +declare module "List/Concat" { + import { _Reverse } from "List/Reverse"; + import { List } from "List/List"; + + export type _Concat = _Reverse<_Reverse, L1>; + + export type Concat = L extends unknown ? L1 extends L1 ? _Concat : never : never; +} +declare module "List/Drop" { + import { Tail } from "List/Tail"; + import { Cast } from "Any/Cast"; + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Number } from "Number/Number"; + import { Way } from "Iteration/_Internal"; + import { List } from "List/List"; + import { Pos } from "Iteration/Pos"; + import { Prev } from "Iteration/Prev"; + import { Prepend } from "List/Prepend"; + import { Naked } from "List/_Internal"; + import { Extends } from "Any/Extends"; + + type DropForth = { + 0: DropForth, Prev>; + 1: L; + }[Extends<0, Pos>]; + + type DropBack, LN extends List = []> = { + 0: DropBack, Prepend]>>; + 1: LN; + }[Extends<-1, Pos>]; + + type __Drop = { + '->': DropForth; + '<-': DropBack; + }[way]; + + export type _Drop = __Drop, IterationOf, way> extends infer X ? Cast : never; + + export type Drop = L extends unknown ? N extends unknown ? _Drop : never : never; +} +declare module "List/Length" { + import { NumberOf } from "Number/NumberOf"; + import { Formats } from "Iteration/_Internal"; + import { List } from "List/List"; + + export type Length = { + 's': NumberOf; + 'n': L['length']; + }[fmt]; +} +declare module "Iteration/Next" { + import { IterationMap } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + + export type Next = IterationMap[I[1]]; +} +declare module "Any/Cast" { + export type Cast = A1 extends A2 ? A1 : A2; +} +declare module "Function/Parameters" { + import { Function } from "Function/Function"; + + export type Parameters = F extends ((...args: infer L) => any) ? L : never; +} +declare module "Function/Return" { + import { Function } from "Function/Function"; + + export type Return = F extends ((...args: any[]) => infer R) ? R : never; +} +declare module "Iteration/Prev" { + import { IterationMap } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + + export type Prev = IterationMap[I[0]]; +} +declare module "Number/NumberOf" { + import { IterationMap } from "Iteration/IterationOf"; + import { Key } from "Iteration/Key"; + import { Pos } from "Iteration/Pos"; + import { Numbers } from "Number/_Internal"; + + export type _NumberOf = { + [K in keyof IterationMap]: Pos extends N ? Key : never; + }[keyof IterationMap]; + + export type NumberOf = N extends Numbers['number']['all'] ? _NumberOf : string; +} +declare module "Object/_Internal" { + export type Modx = ['?' | '!', 'W' | 'R']; + + export type Depth = 'flat' | 'deep'; + + export type Empty = { + [K in keyof O]: undefined; + }; +} +declare module "Iteration/IterationOf" { + import { Number } from "Number/Number"; + + export type IterationMap = { + '-40': ['__', '-39', '-40', -40, '-']; + '-39': ['-40', '-38', '-39', -39, '-']; + '-38': ['-39', '-37', '-38', -38, '-']; + '-37': ['-38', '-36', '-37', -37, '-']; + '-36': ['-37', '-35', '-36', -36, '-']; + '-35': ['-36', '-34', '-35', -35, '-']; + '-34': ['-35', '-33', '-34', -34, '-']; + '-33': ['-34', '-32', '-33', -33, '-']; + '-32': ['-33', '-31', '-32', -32, '-']; + '-31': ['-32', '-30', '-31', -31, '-']; + '-30': ['-31', '-29', '-30', -30, '-']; + '-29': ['-30', '-28', '-29', -29, '-']; + '-28': ['-29', '-27', '-28', -28, '-']; + '-27': ['-28', '-26', '-27', -27, '-']; + '-26': ['-27', '-25', '-26', -26, '-']; + '-25': ['-26', '-24', '-25', -25, '-']; + '-24': ['-25', '-23', '-24', -24, '-']; + '-23': ['-24', '-22', '-23', -23, '-']; + '-22': ['-23', '-21', '-22', -22, '-']; + '-21': ['-22', '-20', '-21', -21, '-']; + '-20': ['-21', '-19', '-20', -20, '-']; + '-19': ['-20', '-18', '-19', -19, '-']; + '-18': ['-19', '-17', '-18', -18, '-']; + '-17': ['-18', '-16', '-17', -17, '-']; + '-16': ['-17', '-15', '-16', -16, '-']; + '-15': ['-16', '-14', '-15', -15, '-']; + '-14': ['-15', '-13', '-14', -14, '-']; + '-13': ['-14', '-12', '-13', -13, '-']; + '-12': ['-13', '-11', '-12', -12, '-']; + '-11': ['-12', '-10', '-11', -11, '-']; + '-10': ['-11', '-9', '-10', -10, '-']; + '-9': ['-10', '-8', '-9', -9, '-']; + '-8': ['-9', '-7', '-8', -8, '-']; + '-7': ['-8', '-6', '-7', -7, '-']; + '-6': ['-7', '-5', '-6', -6, '-']; + '-5': ['-6', '-4', '-5', -5, '-']; + '-4': ['-5', '-3', '-4', -4, '-']; + '-3': ['-4', '-2', '-3', -3, '-']; + '-2': ['-3', '-1', '-2', -2, '-']; + '-1': ['-2', '0', '-1', -1, '-']; + '0': ['-1', '1', '0', 0, '0']; + '1': ['0', '2', '1', 1, '+']; + '2': ['1', '3', '2', 2, '+']; + '3': ['2', '4', '3', 3, '+']; + '4': ['3', '5', '4', 4, '+']; + '5': ['4', '6', '5', 5, '+']; + '6': ['5', '7', '6', 6, '+']; + '7': ['6', '8', '7', 7, '+']; + '8': ['7', '9', '8', 8, '+']; + '9': ['8', '10', '9', 9, '+']; + '10': ['9', '11', '10', 10, '+']; + '11': ['10', '12', '11', 11, '+']; + '12': ['11', '13', '12', 12, '+']; + '13': ['12', '14', '13', 13, '+']; + '14': ['13', '15', '14', 14, '+']; + '15': ['14', '16', '15', 15, '+']; + '16': ['15', '17', '16', 16, '+']; + '17': ['16', '18', '17', 17, '+']; + '18': ['17', '19', '18', 18, '+']; + '19': ['18', '20', '19', 19, '+']; + '20': ['19', '21', '20', 20, '+']; + '21': ['20', '22', '21', 21, '+']; + '22': ['21', '23', '22', 22, '+']; + '23': ['22', '24', '23', 23, '+']; + '24': ['23', '25', '24', 24, '+']; + '25': ['24', '26', '25', 25, '+']; + '26': ['25', '27', '26', 26, '+']; + '27': ['26', '28', '27', 27, '+']; + '28': ['27', '29', '28', 28, '+']; + '29': ['28', '30', '29', 29, '+']; + '30': ['29', '31', '30', 30, '+']; + '31': ['30', '32', '31', 31, '+']; + '32': ['31', '33', '32', 32, '+']; + '33': ['32', '34', '33', 33, '+']; + '34': ['33', '35', '34', 34, '+']; + '35': ['34', '36', '35', 35, '+']; + '36': ['35', '37', '36', 36, '+']; + '37': ['36', '38', '37', 37, '+']; + '38': ['37', '39', '38', 38, '+']; + '39': ['38', '40', '39', 39, '+']; + '40': ['39', '__', '40', 40, '+']; + '__': ['__', '__', string, number, '-' | '0' | '+']; + }; + + export type IterationOf = N extends keyof IterationMap ? IterationMap[N] : IterationMap['__']; +} +declare module "Iteration/Iteration" { + import { IterationMap } from "Iteration/IterationOf"; + + export type Iteration = [keyof IterationMap, keyof IterationMap, string, number, '-' | '0' | '+']; +} +declare module "Iteration/Key" { + import { Iteration } from "Iteration/Iteration"; + import { Format } from "Iteration/Format"; + + export type Key = Format; +} +declare module "List/NonNullable" { + import { Depth } from "Object/_Internal"; + import { NonNullable as ONonNullable } from "Object/NonNullable"; + import { ListOf } from "Object/ListOf"; + import { Cast } from "Any/Cast"; + import { Key } from "Any/Key"; + import { ObjectOf } from "List/ObjectOf"; + import { Implements } from "Any/Implements"; + import { Keys } from "List/Keys"; + import { List } from "List/List"; + import { NumberOf } from "Any/_Internal"; + + export type NonNullable = { + 1: Cast, List>; + 0: ListOf, NumberOf, depth>>; + }[Implements, K>] & {}; +} +declare module "Any/Type" { + const symbol: unique symbol; + + export type Type = A & { + [K in typeof symbol]: Id; + }; +} +declare module "Any/x" { + import { Type } from "Any/Type"; + + export type x = Type<{}, 'x'>; +} +declare module "List/List" { + + export type List = ReadonlyArray; +} +declare module "Function/Function" { + import { List } from "List/List"; + + export interface Function

{ + (...args: P): R; + } +} +declare module "Any/Extends" { + export type Extends = [A1] extends [never] ? 0 : A1 extends A2 ? 1 : 0; +} + +declare module "Function/Curry" { + import { Pos } from "Iteration/Pos"; + import { _Append } from "List/Append"; + import { _Concat } from "List/Concat"; + import { _Drop } from "List/Drop"; + import { Length } from "List/Length"; + import { Next } from "Iteration/Next"; + import { Cast } from "Any/Cast"; + import { Parameters } from "Function/Parameters"; + import { Return } from "Function/Return"; + import { IterationOf } from "Iteration/IterationOf"; + import { Iteration } from "Iteration/Iteration"; + import { Key } from "Iteration/Key"; + import { NonNullable } from "List/NonNullable"; + import { x } from "Any/x"; + import { List } from "List/List"; + import { Function } from "Function/Function"; + import { Extends } from "Any/Extends"; + + type GapOf> = L1[Pos] extends x ? _Append]> : LN; + + type _GapsOf> = { + 0: _GapsOf, Next>; + 1: _Concat>>; + }[Extends, Length>]; + + type GapsOf = _GapsOf extends infer X ? Cast : never; + + type Gaps = NonNullable<{ + [K in keyof L]?: L[K] | x; + }>; + + export type Curry = (...args: Cast>>) => GapsOf> extends infer G ? Length> extends infer L ? L extends 0 ? Return : L extends 1 ? Curry<(...args: Cast) => Return> & ((...args: Cast) => Return) : Curry<(...args: Cast) => Return> : never : never; +} + +