import { HookParameters } from 'astro'; import { Hooks } from './types.js'; import '../internal/types.js'; /** * A utility to be used on an Astro hook. * * @see defineUtility */ type HookUtility, TReturn> = (params: HookParameters, ...args: TArgs) => TReturn; /** * Allows defining a type-safe function requiring all the params of a given hook. * It uses currying to make TypeScript happy. * * @param {string} _hook * * @see https://astro-integration-kit.netlify.app/core/define-utility/ * * @example * ```ts * const test = defineUtility("astro:config:setup")((params, foo: boolean) => { * return "bar"; * }); * ``` */ declare const defineUtility: (_hook: THook) => , T>(fn: HookUtility) => HookUtility; export { type HookUtility, defineUtility };