Skip to content

config question #4649

Closed Answered by metcoder95
gjblajian asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! Thanks for the heads up!

Quickly answering your question, yes, you should be using req.routeConfig instead of route.config, as it will be removed in a future major version.

To reflect your requirements in TS, you need to use the interface augmentation capabilities that Fastify provides. See the following example: https://github.com/metcoder95/fastify-split-validator/blob/a3ad0a8e32658f559bf9c36509b731bcd6140ef8/index.d.ts#LL10C27-L10C27

Regarding the documentation issue, yeah it is a leftover that we didn't notice. Would you like to submit a PR to adjust the documentation? 🙂

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mcollina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants