Skip to content

Conversation

@kyubisation
Copy link
Contributor

Currently the nextjs config wrapper type mistakenly indicates it returns a NextConfig object. It however returns a callback, which receives and returns a NextConfig object.

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2024

🦋 Changeset detected

Latest commit: 318f027

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lit-labs/nextjs Patch

Not sure what this means? Click here to learn what changesets are.

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

@kyubisation kyubisation force-pushed the fix-nextjs-config-wrapper-type branch from f69856b to 318f027 Compare November 21, 2024 18:42
Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! i wonder why TS never complained about the implementation not matching annotation here.

@kyubisation
Copy link
Contributor Author

That is confusing me as well. First I thought that maybe the NextConfig type allows it, but that does not seem to be the case. Next I checked whether export = has some typing problems, but that isn't the case either.
TypeScript just doesn't seem to care for this...

@augustjk augustjk merged commit 37c0250 into lit:main Nov 22, 2024
7 checks passed
@kyubisation kyubisation deleted the fix-nextjs-config-wrapper-type branch November 22, 2024 21:04
@lit-robot lit-robot mentioned this pull request Jan 2, 2025
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.

2 participants