import type { TSchema } from '../schema/index'; import type { TProperties } from '../object/index'; import type { TNever } from '../never/index'; export type TupleToIntersect = T extends [infer I] ? I : T extends [infer I, ...infer R] ? I & TupleToIntersect : never; export type TupleToUnion = { [K in keyof T]: T[K]; }[number]; export type UnionToIntersect = (U extends unknown ? (arg: U) => 0 : never) extends (arg: infer I) => 0 ? I : never; export type UnionLast = UnionToIntersect 0 : never> extends (x: infer L) => 0 ? L : never; export type UnionToTuple> = [U] extends [never] ? Acc : UnionToTuple, [Extract, ...Acc]>; export type Trim = T extends `${' '}${infer U}` ? Trim : T extends `${infer U}${' '}` ? Trim : T; export type Assert = T extends E ? T : never; export type Evaluate = T extends infer O ? { [K in keyof O]: O[K]; } : never; export type Ensure = T extends infer U ? U : never; export type EmptyString = ''; export type ZeroString = '0'; type IncrementBase = { m: '9'; t: '01'; '0': '1'; '1': '2'; '2': '3'; '3': '4'; '4': '5'; '5': '6'; '6': '7'; '7': '8'; '8': '9'; '9': '0'; }; type IncrementTake = IncrementBase[T]; type IncrementStep = T extends IncrementBase['m'] ? IncrementBase['t'] : T extends `${infer L extends keyof IncrementBase}${infer R}` ? L extends IncrementBase['m'] ? `${IncrementTake}${IncrementStep}` : `${IncrementTake}${R}` : never; type IncrementReverse = T extends `${infer L}${infer R}` ? `${IncrementReverse}${L}` : T; export type TIncrement = IncrementReverse>>; /** Increments the given string value + 1 */ export declare function Increment(T: T): TIncrement; export type AssertProperties = T extends TProperties ? T : TProperties; export type AssertRest = T extends E ? T : []; export type AssertType = T extends E ? T : TNever; export {};