Skip to content

Commit

Permalink
Fix build type error of page params (#42019)
Browse files Browse the repository at this point in the history
This PR temporarily fixes #41884 by loosing the type check rules. I will
work on a follow up PR to type params better with tests.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a 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 a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
  • Loading branch information
3 people committed Oct 27, 2022
1 parent 3618b90 commit 491a21b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/build/webpack/plugins/flight-types-plugin.ts
Expand Up @@ -27,12 +27,12 @@ check<IEntry, TEntry>(entry)
type PageParams = Record<string, string>
interface PageProps {
params?: PageParams
searchParams?: Record<string, string | string[]>
params: any
searchParams?: any
}
interface LayoutProps {
children: React.ReactNode
params?: PageParams
params: any
}
type PageComponent = (props: PageProps) => React.ReactNode | Promise<React.ReactNode>
Expand Down

0 comments on commit 491a21b

Please sign in to comment.