// // Function // interface Type { // _value?: T // } // type Infer = T extends Type ? TT : never // type TupleOutput = { // [K in keyof T]: T[K] extends Type ? U : never; // } // type ArrayOutput = [ // ...TupleOutput, // ...(Rest extends Type ? Infer[] : []), // ] // type ArrayType< // Head extends Type[] = Type[], // Rest extends Type | undefined = Type | undefined, // > = Type> // function tuple(items: T): ArrayType { // return {} as any // } // function string(): Type { // return {} as any // } // function boolean(): Type { // return {} as any // } // function number(): Type { // return {} as any // } // const tt = tuple([number(), string(), boolean()]) // type ttt = Infer // expected [number, string, boolean] // //