import { MiddlewareNext } from '../middleware-dispatcher'; import { Awaitable } from '../types'; export type I18nMiddlewareFunc = (locale: string, text: string, ...ex: Ex) => string | undefined; export type I18nMiddlewareNext = MiddlewareNext>; export type I18nMiddleware = (locale: string, text: string, next: I18nMiddlewareNext, ...ex: Ex) => Awaitable; export interface I18nOptions { locales: string[]; defaultLocale?: string; }