hkt-toolbelt
Advanced tools
Comparing version 0.20.0 to 0.20.1
import { Boolean, Digit, DigitList, Kind, NaturalNumber, Type } from "../"; | ||
type _$compare2<A extends DigitList.DigitList, B extends DigitList.DigitList, A_LENGTH extends DigitList.DigitList = NaturalNumber._$toList<A["length"]>, B_LENGTH extends DigitList.DigitList = NaturalNumber._$toList<B["length"]>, IS_SAME_LENGTH extends boolean = A_LENGTH extends B_LENGTH ? true : false, BOTH_SINGLE_DIGIT extends boolean = Boolean._$and<A_LENGTH extends ["1"] ? true : false, B_LENGTH extends ["1"] ? true : false>, A_FIRST extends Digit.Digit = DigitList._$first<A>, B_FIRST extends Digit.Digit = DigitList._$first<B>, A_NEXT extends DigitList.DigitList = DigitList._$shift<A>, B_NEXT extends DigitList.DigitList = DigitList._$shift<B>, COMP = Digit._$compare<A_FIRST, B_FIRST>, RESULT = IS_SAME_LENGTH extends false ? _$compare2<A_LENGTH, B_LENGTH> : A extends [] ? B extends [] ? 0 : -1 : B extends [] ? 1 : BOTH_SINGLE_DIGIT extends true ? Digit._$compare<A_FIRST, B_FIRST> : COMP extends 0 ? _$compare2<A_NEXT, B_NEXT> : COMP> = RESULT; | ||
export type _$compare<A extends DigitList.DigitList, B extends DigitList.DigitList, RESULT = _$compare2<A, B>> = RESULT; | ||
type _$compare2<A extends DigitList.DigitList, B extends DigitList.DigitList, A_LENGTH extends DigitList.DigitList = NaturalNumber._$toList<A["length"]>, B_LENGTH extends DigitList.DigitList = NaturalNumber._$toList<B["length"]>, IS_SAME_LENGTH extends boolean = A_LENGTH extends B_LENGTH ? true : false, BOTH_SINGLE_DIGIT extends boolean = Boolean._$and<A_LENGTH extends ["1"] ? true : false, B_LENGTH extends ["1"] ? true : false>, A_FIRST extends Digit.Digit = DigitList._$first<A>, B_FIRST extends Digit.Digit = DigitList._$first<B>, A_NEXT extends DigitList.DigitList = DigitList._$shift<A>, B_NEXT extends DigitList.DigitList = DigitList._$shift<B>, COMP extends 1 | 0 | -1 = Digit._$compare<A_FIRST, B_FIRST>, RESULT extends 1 | 0 | -1 = IS_SAME_LENGTH extends false ? _$compare2<A_LENGTH, B_LENGTH> : A extends [] ? B extends [] ? 0 : -1 : B extends [] ? 1 : BOTH_SINGLE_DIGIT extends true ? Digit._$compare<A_FIRST, B_FIRST> : COMP extends 0 ? _$compare2<A_NEXT, B_NEXT> : COMP> = RESULT; | ||
export type _$compare<A extends DigitList.DigitList, B extends DigitList.DigitList, RESULT extends 1 | 0 | -1 = _$compare2<A, B>> = RESULT; | ||
interface Compare_T<X extends DigitList.DigitList> extends Kind.Kind { | ||
@@ -5,0 +5,0 @@ f(x: Type._$cast<this[Kind._], DigitList.DigitList>): _$compare<X, typeof x>; |
@@ -8,2 +8,3 @@ export * from "./add"; | ||
export * from "./first"; | ||
export * from "./from-string"; | ||
export * from "./increment"; | ||
@@ -10,0 +11,0 @@ export * from "./is-even"; |
@@ -124,3 +124,3 @@ import { Digit, Kind, Type } from '../'; | ||
]; | ||
export type _$compare<A extends Digit.Digit, B extends Digit.Digit> = _$compare_LUT[A][B]; | ||
export type _$compare<A extends Digit.Digit, B extends Digit.Digit, RESULT extends 1 | 0 | -1 = _$compare_LUT[A][B]> = RESULT; | ||
interface Compare_T<A extends Digit.Digit> extends Kind.Kind { | ||
@@ -127,0 +127,0 @@ f(x: Type._$cast<this[Kind._], Digit.Digit>): _$compare<A, typeof x>; |
export * from "./absolute"; | ||
export * from "./compare"; | ||
export * from "./from-string"; | ||
@@ -3,0 +4,0 @@ export * from "./is-fractional"; |
{ | ||
"name": "hkt-toolbelt", | ||
"version": "0.20.0", | ||
"version": "0.20.1", | ||
"description": "Functional and composable type utilities", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
130712
221
3389