Prerequisites
Fastify version
4.0.0-rc.3
Plugin version
No response
Node.js version
16.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Ubuntu 20.04
Description
I'm having TypeScript issues in the route preHandler when the package @fastify/auth ^3.0.0 is being used altogether. I'm unsure if this an issue of that package or this, but I've began experiencing issues once .withTypeProvider<TypeBoxTypeProvider>() is called. The error received:
Type 'preHandlerHookHandler<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown, FastifySchema, FastifyTypeProviderDefault, ResolveFastifyRequestType<...>, FastifyLoggerInstance>' is not assignable to type 'preHandlerHookHandler<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown, FastifySchema, TypeBoxTypeProvider, ResolveFastifyRequestType<...>, FastifyLoggerInstance> | preHandlerHookHandler<...>[] | undefined'.
Steps to Reproduce
Install fastify@4, @fastify/auth@3 and .1.0-beta.1 version of this plugin in a TypeScript environment. Calling the fastify.auth([]) in the route preHandler will give a type error.
Expected Behavior
No response
Prerequisites
Fastify version
4.0.0-rc.3
Plugin version
No response
Node.js version
16.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Ubuntu 20.04
Description
I'm having TypeScript issues in the route
preHandlerwhen the package@fastify/auth^3.0.0 is being used altogether. I'm unsure if this an issue of that package or this, but I've began experiencing issues once.withTypeProvider<TypeBoxTypeProvider>()is called. The error received:Steps to Reproduce
Install
fastify@4,@fastify/auth@3and.1.0-beta.1version of this plugin in a TypeScript environment. Calling thefastify.auth([])in the routepreHandlerwill give a type error.Expected Behavior
No response