@tempots/ui

ExtractParams type

Extracts the parameters from a string literal representing a route path.

Signature:

export type ExtractParams<S extends string> = SplitLiteral<S, '/'> extends infer T ? T extends unknown[] ? ExtractParamsFromTuple<T> : never : never;

References: ExtractParamsFromTuple