import { FastifyPluginOptions, FastifyPluginCallback, FastifyPluginAsync } from './plugin' import { LogLevel } from './logger' import { FastifyInstance } from './instance' import { RawServerBase } from './utils' import { FastifyBaseLogger, FastifyTypeProvider, RawServerDefault } from '../fastify' export interface RegisterOptions { prefix?: string; logLevel?: LogLevel; logSerializers?: Record string>; } export type FastifyRegisterOptions = (RegisterOptions & Options) | ((instance: FastifyInstance) => RegisterOptions & Options) /** * FastifyRegister * * Function for adding a plugin to fastify. The options are inferred from the passed in FastifyPlugin parameter. */ export interface FastifyRegister { ( plugin: FastifyPluginCallback, opts?: FastifyRegisterOptions ): T; ( plugin: FastifyPluginAsync, opts?: FastifyRegisterOptions ): T; ( plugin: FastifyPluginCallback | FastifyPluginAsync | Promise<{ default: FastifyPluginCallback }> | Promise<{ default: FastifyPluginAsync }>, opts?: FastifyRegisterOptions ): T; }