Closed Uzlopak closed 1 year ago
hmm. i think it is false green. Dont merge
@fastify/typescript
Can you have a look please?
I am actually highly confident, that this is the solution.
Hey. This approach is new to me: instead of using polymorphism, we are going with a generic inference. I like it! I am wondering if there are other points in the Fastify ecosystem where we can use the same approach (the same one we did with the infamous triplet and the export = thing when we discovered it)
How? Could you open a fresh issue?
@mcollina Probably mixed use of async and callback. like we had in #220 Should we add the infomation, that you should not mix both approaches?
Should we add the infomation, that you should not mix both approaches?
yes
created an issue #221
Fixes #217
I got help from @webstrand. Props to him.
It should now work.
According to webstrand
Maybe needs a new paragraph regarding typing in the readme.md were we basically write, that they should not use the generics but specify the types on the parameters, when calling fastifyPlugin?
Checklist
npm run test
andnpm run benchmark