-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.5.2
Plugin version
No response
Node.js version
16.17.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.15.1
Description
The fresh TypeScript 4.8 release is not compatible with Fastify's types.
Example:
node_modules/fastify/types/route.d.ts:48:98 - error TS2344: Type 'SchemaCompiler' does not satisfy the constraint 'FastifySchema'.
48 onRequest?: onRequestHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger> | onRequestHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig,
SchemaCompiler, TypeProvider, Logger>[];
~~~~~~~~~~~~~~
node_modules/fastify/types/route.d.ts:27:3
27 SchemaCompiler = FastifySchema,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an `extends FastifySchema` constraint.
/cc @fastify/typescript
Steps to Reproduce
See https://github.com/SimenB/fastify-ts
Expected Behavior
No type error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels