Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): make definitions nodenext compatible #224

Merged
merged 5 commits into from
Oct 24, 2022
Merged

fix(types): make definitions nodenext compatible #224

merged 5 commits into from
Oct 24, 2022

Conversation

SuperchupuDev
Copy link
Contributor

@SuperchupuDev SuperchupuDev commented Sep 22, 2022

Fixes #223

Checklist

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 22, 2022

Do we have a typing test for this?

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 23, 2022

CI is failing.

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

It is not a proper fix and it will just break the existing user.
The proper fix should follow fastify/fastify-cookie#184 or fastify/fastify-static#311

And most likely it requires to fix in all modules including core.

@SuperchupuDev SuperchupuDev changed the title fix(types): use correct export statement fix(types): make definitions nodenext compatible Sep 23, 2022
@SuperchupuDev
Copy link
Contributor Author

SuperchupuDev commented Sep 23, 2022

I tried fixing the tests but the error messages are really complex for a person that doesn't know much about fastify's internals. Adding Partial<> to some types in the failing tests worked but I don't think that's an actual fix. Would anyone be willing to fix the tests, or at least point to the correct direction?

@akphi akphi mentioned this pull request Oct 11, 2022
4 tasks
@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 17, 2022

@SuperchupuDev
@climba03003

I fixed the typings.

Co-authored-by: KaKa <climba03003@gmail.com>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@fox1t can you confirm this is correct?

index.d.ts Show resolved Hide resolved
Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

LGTM after Lint fix

index.d.ts Outdated Show resolved Hide resolved
@Uzlopak Uzlopak merged commit d37c1de into fastify:master Oct 24, 2022
@SuperchupuDev SuperchupuDev deleted the patch-1 branch October 24, 2022 09:51
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.

Incorrect default import types in ESM
5 participants