11import {
2- FastifyTypeProvider ,
2+ FastifyBaseLogger ,
3+ FastifyPluginAsync ,
4+ FastifyPluginCallback ,
35 FastifyPluginOptions ,
6+ FastifyTypeProvider ,
47 RawServerBase ,
5- RawServerDefault ,
6- FastifyPluginCallback ,
7- FastifyPluginAsync
8+ RawServerDefault
89} from 'fastify'
910
10- import { JSONSchema , FromSchema , FromSchemaOptions , FromSchemaDefaultOptions } from 'json-schema-to-ts'
11+ import { FromSchema , FromSchemaDefaultOptions , FromSchemaOptions , JSONSchema } from 'json-schema-to-ts'
1112
1213export interface JsonSchemaToTsProvider < Options extends FromSchemaOptions = FromSchemaDefaultOptions > extends FastifyTypeProvider {
1314 output : this[ 'input' ] extends JSONSchema ? FromSchema < this[ 'input' ] , Options > : unknown ;
@@ -27,8 +28,9 @@ export interface JsonSchemaToTsProvider<Options extends FromSchemaOptions = From
2728 */
2829export type FastifyPluginCallbackJsonSchemaToTs <
2930 Options extends FastifyPluginOptions = Record < never , never > ,
30- Server extends RawServerBase = RawServerDefault
31- > = FastifyPluginCallback < Options , Server , JsonSchemaToTsProvider > ;
31+ Server extends RawServerBase = RawServerDefault ,
32+ Logger extends FastifyBaseLogger = FastifyBaseLogger ,
33+ > = FastifyPluginCallback < Options , Server , JsonSchemaToTsProvider , Logger > ;
3234
3335/**
3436 * FastifyPluginAsync with JSON Schema to Typescript automatic type inference
@@ -43,5 +45,6 @@ export type FastifyPluginCallbackJsonSchemaToTs<
4345 */
4446export type FastifyPluginAsyncJsonSchemaToTs <
4547 Options extends FastifyPluginOptions = Record < never , never > ,
46- Server extends RawServerBase = RawServerDefault
47- > = FastifyPluginAsync < Options , Server , JsonSchemaToTsProvider > ;
48+ Server extends RawServerBase = RawServerDefault ,
49+ Logger extends FastifyBaseLogger = FastifyBaseLogger ,
50+ > = FastifyPluginAsync < Options , Server , JsonSchemaToTsProvider , Logger > ;
0 commit comments