diff --git a/packages/fastify-api-reference/src/fastifyApiReference.ts b/packages/fastify-api-reference/src/fastifyApiReference.ts index 78ec732eae8..63ddc0d50ab 100644 --- a/packages/fastify-api-reference/src/fastifyApiReference.ts +++ b/packages/fastify-api-reference/src/fastifyApiReference.ts @@ -1,4 +1,10 @@ import type { ReferenceConfiguration } from '@scalar/api-reference' +import type { + FastifyBaseLogger, + FastifyPluginAsync, + FastifyTypeProviderDefault, + RawServerDefault, +} from 'fastify' import fp from 'fastify-plugin' import { getJavaScriptFile } from './utils' @@ -162,7 +168,13 @@ export function htmlDocument(options: FastifyApiReferenceOptions) { ` } -const fastifyApiReference = fp( +const fastifyApiReference = fp< + FastifyApiReferenceOptions, + RawServerDefault, + FastifyTypeProviderDefault, + FastifyBaseLogger, + FastifyPluginAsync +>( async (fastify, options) => { let { configuration } = options const hasSwaggerPlugin = fastify.hasPlugin('@fastify/swagger')