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

Adding types to declaration merge for route transact option in typesc… #142

Merged

Conversation

bdun94
Copy link
Contributor

@bdun94 bdun94 commented Aug 12, 2022

Extended FastifyRequest and RouteShorthandOptions so that the transact route option is usable in typescript. Basically added in the missing definitions in the typescript declaration merging so that when using the transact route typescript compile errors are not thrown

resolves #141

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added (don't think it's necessary for this change?)
  • commit message and code follows the Developer's Certification of Origin
    and the Code of conduct

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.

Can you clean up the unnecessary styles changes?
e.g. quotes

@bdun94
Copy link
Contributor Author

bdun94 commented Aug 16, 2022

sorry about that @climba03003 should've caught that, let me know if there's anything else that needs to be changed

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

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

LGTM, just a nitpick

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

Co-authored-by: Uzlopak <aras.abbasi@googlemail.com>
@mcollina mcollina merged commit 9fbdc74 into fastify:master Aug 16, 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.

Typescript types missing for FastifyRequest and RouteShorthandOptions when using the transact route option
4 participants