Skip to content

Commit

Permalink
Fix param array types
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Jun 4, 2022
1 parent c13508a commit d0cdfb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,17 @@ export function fromRequest<Fn extends (req: ServerRequest, ...rest: any[]) => a
export type RouteParams<T extends string> = T extends `${string}:${infer P}?/${infer Rest}`
? {[K in P]?: string} & RouteParams<Rest>
: T extends `${string}:${infer P}*/${infer Rest}`
? {[K in P]?: string} & RouteParams<Rest>
? {[K in P]?: string[]} & RouteParams<Rest>
: T extends `${string}:${infer P}+/${infer Rest}`
? {[K in P]: string} & RouteParams<Rest>
? {[K in P]: string[]} & RouteParams<Rest>
: T extends `${string}:${infer P}/${infer Rest}`
? {[K in P]: string} & RouteParams<Rest>
: 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}
: {}

0 comments on commit d0cdfb6

Please sign in to comment.