import type { FrozenResolvedCliOptions } from '../utils/config/cli-options'; import type { FastifyInstance } from 'fastify'; export type BeforeBuildHook = 'before-build'; export type BeforeServeHook = 'before-serve'; export type Hook = BeforeBuildHook | BeforeServeHook; export type NamedCallBackHook = { callBack: T; name: string; }; /** * Callback function to be applied before the build * @internal * @experimental */ export type BeforeBuildCallback = (appOptions: FrozenResolvedCliOptions) => void | Promise; /** * Callback function to be applied before serving * @internal * @experimental */ export type BeforeServeCallBack = (appOptions: FrozenResolvedCliOptions, fastify: FastifyInstance) => void | Promise; export type CallBack = BeforeBuildCallback | BeforeServeCallBack;