UNPKG

remix-hono

Version:
17 lines (16 loc) 801 B
import type { Context } from "hono"; import type { FlatNamespace, TFunction } from "i18next"; import type { RemixI18NextOption } from "remix-i18next/server"; import { RemixI18Next } from "remix-i18next/server"; type Env = { Variables: Record<symbol, unknown>; }; export declare function i18next(options: RemixI18NextOption | RemixI18Next): import("hono").MiddlewareHandler<Env, string, {}>; export declare namespace i18next { var get: (c: Context<Env>) => RemixI18Next; var getLocale: (c: Context<Env>) => string; var getFixedT: <Ns extends FlatNamespace = "translation">(c: Context<Env>, { namespace }?: { namespace?: Ns; }) => Promise<TFunction<Ns extends undefined ? "translation" : Ns extends import("i18next").Namespace ? Ns : "translation", undefined>>; } export {};