type StringBool = "true"|"false"; interface AnyNumber { prev?: any, isZero: StringBool }; interface PositiveNumber { prev: any, isZero: "false" }; type IsZero<TNumber extends AnyNumber> = TNumber["isZero"]; type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" }; type Prev<TNumber extends PositiveNumber> = TNumber["prev"]; type Add<T1 extends AnyNumber, T2> = { "true": T2, "false