Viewing File: /home/ubuntu/voice-assistant-frontend/node_modules/react-multi-lang/lib/index.d.ts

import React from 'react';
import { SetDifference, Subtract } from 'utility-types';
type Subscription = () => any;
interface ITranslation {
    [key: string]: string | ITranslation;
}
export interface ITranslationParams {
    [key: string]: string;
}
export interface ITranslations {
    [key: string]: ITranslation;
}
export interface ITranslate {
    t(path: string, args?: {
        [key: string]: string;
    }): string;
}
export declare function subscribe(cb: Subscription): number;
export declare function unsubscribe(componentId: number): void;
export declare function setDefaultLanguage(lang: string): void;
export declare function setDefaultTranslations(userTranslations: ITranslations): void;
export declare function setTranslations(userTranslations: ITranslations): void;
export declare function setLanguage(lang: string): void;
export declare function getLanguage(): string;
export declare function t(path: string, args?: ITranslationParams): string;
export declare function useTranslation(basePath?: string): (path: string, args?: ITranslationParams) => string;
export declare function withTranslation<P extends ITranslate>(Component: React.ComponentType<Pick<P, SetDifference<keyof P, 't'>>>, basePath?: string): React.ComponentType<Subtract<P, ITranslate>>;
declare const _default: {
    setDefaultLanguage: typeof setDefaultLanguage;
    setLanguage: typeof setLanguage;
    setDefaultTranslations: typeof setDefaultTranslations;
    setTranslations: typeof setTranslations;
    withTranslation: typeof withTranslation;
    useTranslation: typeof useTranslation;
    subscribe: typeof subscribe;
    unsubscribe: typeof unsubscribe;
    t: typeof t;
};
export default _default;
//# sourceMappingURL=index.d.ts.map
Back to Directory File Manager