Skip to content

fix(AppType): correct generic placement to match runtime props spreading (#42846) - #98610

Open
CJstate wants to merge 1 commit into
vercel:canaryfrom
CJstate:fix/apptype-generic-42846
Open

fix(AppType): correct generic placement to match runtime props spreading (#42846)#98610
CJstate wants to merge 1 commit into
vercel:canaryfrom
CJstate:fix/apptype-generic-42846

Conversation

@CJstate

@CJstate CJstate commented Sep 13, 2026

Copy link
Copy Markdown

Fixes #42846

Summary

Move generic P from nested inside pageProps to top-level in AppType.

  • Runtime: MyApp.props = { ...pageProps, ...App.getInitialProps result }
  • Previously: P incorrectly nested as pageProps: P
  • Now: P spread at top level, pageProps retains any

Changes

  • packages/next/src/shared/lib/utils.ts: Corrected generic placement and added explanatory comment referencing the issue

…ing (vercel#42846)

- Move generic P from nested inside pageProps to top-level
  - Runtime: MyApp.props = { ...pageProps, ...App.getInitialProps result }
  - Previously: P incorrectly nested as pageProps: P
  - Now: P spread at top level, pageProps retains any

- Add explanatory comment referencing the issue

Fixes vercel#42846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parameter on AppType is used incorrectly

1 participant