import { FastifyPluginOptions, FastifyPluginCallback, FastifyPluginAsync } from './plugin' import { LogLevel } from './logger' /** * 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; } export type FastifyRegisterOptions = (RegisterOptions & Options) | (() => RegisterOptions & Options) interface RegisterOptions { prefix?: string; logLevel?: LogLevel; }