import type { YogaLogger } from 'graphql-yoga'; import type { HookConfig, HookFunction, MemoizedFns } from '../types'; /** * Configuration for hook function resolution */ export interface HookResolverConfig { hookConfig: HookConfig; hookType: 'beforeAll' | 'afterAll'; baseDir: string; logger: YogaLogger; memoizedFns: MemoizedFns; } /** * Configuration for source hook resolution */ export interface SourceHookResolverConfig { hookConfigs: HookConfig[]; hookType: 'beforeSource' | 'afterSource'; baseDir: string; logger: YogaLogger; memoizedFns: MemoizedFns; } /** * Resolves and memoizes hook functions with consistent logic for both beforeAll and afterAll hooks * * @param config - Configuration object containing hook config, type, and dependencies * @returns Promise - The resolved hook function or undefined if none configured * * @example * ```typescript * const hookFn = await resolveHookFunction({ * hookConfig: beforeAllConfig, * hookType: 'beforeAll', * baseDir: '/path/to/base', * logger: yogaLogger, * memoizedFns: memoizedFunctions * }); * ``` */ export declare function resolveHookFunction(config: HookResolverConfig): Promise; /** * Resolves a single source hook function with memoization * * @param hookConfig - The hook configuration * @param index - The index of the hook in the array * @param config - Configuration object containing dependencies * @param sourceName - The name of the source for which the hook is being resolved * @returns Promise - The resolved hook function or undefined */ export declare function resolveSourceHookFunction(hookConfig: HookConfig, index: number, config: SourceHookResolverConfig, sourceName: string): Promise;