import { I18nInstance, ServerI18nScope, CreateServerI18nScopeOptions } from './index.js'; /** Resolves the i18n instance that belongs to an incoming server request. */ type ServerI18nResolver = (request: Request) => T | Promise; /** Configuration for a request-scoped i18n runner. */ type CreateScopedI18nRunnerOptions = { /** Adapter-specific error text when resolving request i18n fails. */ failureMessage: string; }; /** Runs adapter dispatch inside one resolved request-local i18n scope. */ type ScopedI18nRunner = { run(request: Request, next: (i18n: T) => Result | Promise): Promise; scope: ServerI18nScope; }; declare function createServerI18nScope(options?: CreateServerI18nScopeOptions): ServerI18nScope; /** * Resolves request i18n and runs adapter dispatch in its shared server scope. * * Framework packages supply their own public wrapper and curated resolver * failure text, while this function owns the identical resolution and async * scope lifecycle. */ declare function createScopedI18nRunner(resolveI18n: ServerI18nResolver, { failureMessage }: CreateScopedI18nRunnerOptions): ScopedI18nRunner; export { CreateServerI18nScopeOptions, ServerI18nScope, createScopedI18nRunner, createServerI18nScope }; export type { CreateScopedI18nRunnerOptions, ScopedI18nRunner, ServerI18nResolver };