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

update type declarations #102

Closed
wants to merge 1 commit into from

Conversation

bdrhn9
Copy link

@bdrhn9 bdrhn9 commented Oct 6, 2022

There was import issue on TypeScript, because type declarations doesn't match actual implementations. PR solves this issue.

Checklist

@Uzlopak Uzlopak requested a review from kibertoad October 6, 2022 11:55
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.

Typing should be correct for fastify-plugin@4, it just require a new release.

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 6, 2022

@climba03003

Yes you are right.

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

Uzlopak commented Oct 6, 2022

I think #103 will fix it properly

@bdrhn9
Copy link
Author

bdrhn9 commented Oct 6, 2022

As you can see here, there is sth named fastifySchedule declared as FastifyPluginCallback but index.js doesn't export something named fastifySchedule. I'm not much familiar with TypeScript but index.d.ts needs to declare explicitly fastifySchedulePlugin exported by index.js.

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 6, 2022

@bdrhn9

Dont worry. The issue is that we should have exported the code differently.

@bdrhn9
Copy link
Author

bdrhn9 commented Oct 6, 2022

@Uzlopak okay, thank you 😺 Am I supposed to close this PR?

@climba03003
Copy link
Member

As you can see here, there is sth named fastifySchedule declared as FastifyPluginCallback but index.js doesn't export something named fastifySchedule. I'm not much familiar with TypeScript but index.d.ts needs to declare explicitly fastifySchedulePlugin exported by index.js.

fastify-plugin do the other named export.

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 6, 2022

Yes, you can close this PR as it should be solved by #103. You are welcome to test if #103 fixes your issue.

export default fastifySchedule;
export { fastifySchedule };
export default fastifySchedulePlugin;
export { fastifySchedulePlugin };
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export { fastifySchedulePlugin };
export { fastifySchedule, fastifySchedulePlugin };

@bdrhn9 bdrhn9 closed this Oct 6, 2022
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.

3 participants