diff --git a/src/zap.ts b/src/zap.ts index d631763..07cae3b 100644 --- a/src/zap.ts +++ b/src/zap.ts @@ -326,17 +326,17 @@ export function fromRequest a export type RouteParams = T extends `${string}:${infer P}?/${infer Rest}` ? {[K in P]?: string} & RouteParams : T extends `${string}:${infer P}*/${infer Rest}` - ? {[K in P]?: string} & RouteParams + ? {[K in P]?: string[]} & RouteParams : T extends `${string}:${infer P}+/${infer Rest}` - ? {[K in P]: string} & RouteParams + ? {[K in P]: string[]} & RouteParams : T extends `${string}:${infer P}/${infer Rest}` ? {[K in P]: string} & RouteParams : T extends `${string}:${infer P}?` ? {[K in P]?: string} : T extends `${string}:${infer P}*` - ? {[K in P]?: string} + ? {[K in P]?: string[]} : T extends `${string}:${infer P}+` - ? {[K in P]: string} + ? {[K in P]: string[]} : T extends `${string}:${infer P}` ? {[K in P]: string} : {}