import { Type } from './Type'; type ToTuple = T extends infer I extends unknown[] & unknown[] ? I : never; export { $Id as Id, $Record as Record, $Array as Array, $Tuple as Tuple, $ReadonlyTuple as ReadonlyTuple, $ReadonlyArray as ReadonlyArray, $Set as Set, $ReadonlySet as ReadonlySet, $WeakSet as WeakSet, $Map as Map, $ReadonlyMap as ReadonlyMap, $WeakMap as WeakMap, $Function as Function, $UnaryFunction as UnaryFunction, $Promise as Promise }; type $Unary = Type<1>; type $Binary = Type<2>; type $Variadic = Type; interface $Id extends $Unary { type: this[0]; } interface $Record extends Type<[PropertyKey, unknown]> { type: Record; } interface $Array extends $Unary { type: Array; } interface $Tuple extends $Variadic { type: ToTuple; } interface $ReadonlyTuple extends $Variadic { type: readonly [...ToTuple]; } interface $ReadonlyArray extends $Unary { type: ReadonlyArray; } interface $Set extends $Unary { type: Set; } interface $ReadonlySet extends $Unary { type: ReadonlySet; } interface $WeakSet extends Type<[object]> { type: WeakSet; } interface $Map extends $Binary { type: Map; } interface $ReadonlyMap extends $Binary { type: ReadonlyMap; } interface $WeakMap extends Type<[object, unknown]> { type: WeakMap; } interface $Function extends Type<[any[], unknown]> { type: (...args: this[0] extends any[] ? this[0] : any[]) => this[1]; } interface $UnaryFunction extends $Binary { type: (a: unknown extends this[0] ? any : this[0]) => this[1]; } interface $Promise extends $Unary { type: Promise; } declare global { interface Set { } interface ReadonlySet { } interface WeakSet { } interface Map { } interface ReadonlyMap { } interface WeakMap { } }