From d7ddc86d442d035df1b45a4f40d740cec9846185 Mon Sep 17 00:00:00 2001 From: Cristi Petre Date: Tue, 18 Oct 2022 12:33:31 +0100 Subject: [PATCH 1/2] test(types): assign to default `FastifyInstance` --- types/index.test-d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/index.test-d.ts b/types/index.test-d.ts index ef76c89..9027e68 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -5,6 +5,7 @@ import Fastify, { FastifyInstance, FastifyLoggerInstance, RawReplyDefaultExpress const fastify = Fastify().withTypeProvider() expectAssignable>(fastify) +expectAssignable(fastify) fastify.get('/', { schema: { From eb0d670957239b5f3ea2b1fe8cff7c8777817b9d Mon Sep 17 00:00:00 2001 From: Cristi Petre Date: Tue, 18 Oct 2022 12:35:06 +0100 Subject: [PATCH 2/2] fix(types): assign to `FastifyTypeProviderDefault` --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index c830a9c..4bac146 100644 --- a/index.ts +++ b/index.ts @@ -49,7 +49,7 @@ export const TypeBoxValidatorCompiler: FastifySchemaCompiler = ({ schem * ``` */ export interface TypeBoxTypeProvider extends FastifyTypeProvider { - output: this['input'] extends TSchema ? Static : never + output: this['input'] extends TSchema ? Static : unknown } /**