type Detection = { detect: string; lookup?: any; cache?: boolean; } & Record; type Detections = D extends undefined ? T : T | U; interface BaseDetector = Record, U extends Record = Record> { name: string; resolveLng: (options: { lookup: any; lngs: string[]; } & T) => string | undefined | null; persistLng?: (lng: string, options: { lookup: any; } & U) => void; } declare function detectLanguage({ detection, fallbackLng, lngs, }: { detection: T[]; fallbackLng: string; lngs: string[]; }, onDetect: ({ detect, lookup }: { lookup: unknown | undefined; detect: string; }) => string | null | undefined): string; export { type BaseDetector, type Detection, type Detections, detectLanguage };