@tempots/ui

ExtractParamsFromTuple type

Extracts the parameter names from a tuple type.

Signature:

export type ExtractParamsFromTupleextends unknown[]> = S extends [] ? [] : S extends [infer H, ...infer R] ? H extends `:${infer P}` ? [P, ...ExtractParamsFromTuple] : ExtractParamsFromTuple : never;

References: ExtractParamsFromTuple