Skip to content

Conversation

@ash2228
Copy link

@ash2228 ash2228 commented Apr 21, 2025

Fixes [#44434] (#44434)

Problem

  • AppType<P> incorrectly applied P to pageProps instead of root props
  • Type checking didn't match runtime behavior

Solution

Modified AppType definition in utils.ts to:

export type AppType<P = {}> = NextComponentType<
  AppContextType,
  P & { pageProps?: any },
  AppPropsType<Router, P>
>

@ijjk
Copy link
Member

ijjk commented Apr 21, 2025

Allow CI Workflow Run

  • approve CI run for commit: d8ddcf9

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@ash2228
Copy link
Author

ash2228 commented Apr 21, 2025

This is my first contribution. I've:

  • Fixed the AppType typing issue
  • Added test coverage
  • Verified the core functionality works locally

The CI failures appear unrelated to my changes. Could you:

  1. Confirm if these are known environment issues?
  2. Suggest how I can help resolve them?

@ash2228
Copy link
Author

ash2228 commented Apr 21, 2025

@ijjk Thanks for the review!

  • Confirmed the type fix works locally
  • Tests pass as shown in the reproduction
  • Ready for CI approval when convenient

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2025

⚠️ No Changeset found

Latest commit: d8ddcf9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@timneutkens
Copy link
Member

Thanks for the PR. At this point we're not making changes to the Pages Router types in order to be fully backwards compatible with existing applications.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants