Skip to content

Commit

Permalink
Add support for catch-all route params in NextRequest page type decla…
Browse files Browse the repository at this point in the history
…ration (#36137)

fixes #36136

## Bug

- [X] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
  • Loading branch information
prichey committed Apr 13, 2022
1 parent f74b59c commit a5103d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next/server/web/spec-extension/request.ts
Expand Up @@ -13,7 +13,7 @@ export class NextRequest extends Request {
cookieParser(): { [key: string]: string }
geo: RequestData['geo']
ip?: string
page?: { name?: string; params?: { [key: string]: string } }
page?: { name?: string; params?: { [key: string]: string | string[] } }
ua?: UserAgent | null
url: NextURL
}
Expand Down Expand Up @@ -105,7 +105,7 @@ export interface RequestInit extends globalThis.RequestInit {
}
page?: {
name?: string
params?: { [key: string]: string }
params?: { [key: string]: string | string[] }
}
}

Expand Down

0 comments on commit a5103d2

Please sign in to comment.