Skip to content

fix(next): type AppType generic as app props#94083

Open
bobu-putheeckal wants to merge 1 commit into
vercel:canaryfrom
bobu-putheeckal:codex/app-type-app-props
Open

fix(next): type AppType generic as app props#94083
bobu-putheeckal wants to merge 1 commit into
vercel:canaryfrom
bobu-putheeckal:codex/app-type-app-props

Conversation

@bobu-putheeckal
Copy link
Copy Markdown

What?

Update AppType<P> so its generic parameter augments app props instead of pageProps.

Why?

The current type applies P to pageProps, which makes custom app-level props inferred from getInitialProps harder to type and does not match the apparent intent of the exported helper.

Closes #42846

How?

  • Change AppType<P> to compose P with AppPropsType<any>.
  • Extend the TypeScript e2e fixture to verify custom app props are available and not treated as pageProps.

Testing

  • Focused tsc check for test/e2e/typescript/pages/_app.tsx
  • git diff --check
  • prettier --check on touched files

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