Installation
npm install --save @types/i18next-fs-backend
Summary
This package contains type definitions for i18next-fs-backend (https://github.com/i18next/i18next-fs-backend).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/i18next-fs-backend.
import { BackendModule, InitOptions, Services, ReadCallback } from 'i18next';
export namespace i18next {
interface InitOptions {
backend?: i18nextFsBackend.i18nextFsBackendOptions | undefined;
}
}
export namespace i18nextFsBackend {
type loadPathFunction = (language: string, namespace: string) => string;
interface i18nextFsBackendOptions {
loadPath?: string | loadPathFunction | undefined;
addPath?: string | undefined;
ident?: number | undefined;
parse?: ((data: string) => unknown) | undefined;
stringify?: ((data: unknown) => string) | undefined;
}
}
export default class Backend implements BackendModule<i18nextFsBackend.i18nextFsBackendOptions> {
type: 'backend';
constructor(services: Services, backendOptions: i18nextFsBackend.i18nextFsBackendOptions, i18nextOptions: InitOptions);
init(services: Services, backendOptions: i18nextFsBackend.i18nextFsBackendOptions, i18nextOptions: InitOptions): void;
read(language: string, namespace: string, callback: ReadCallback): void;
create(languages: string[], namespace: string, key: string, fallbackValue: string): void;
write(): void;
writeFile(lng: string, namespace: string): void;
queue(lng: string, namespace: string, key: string, fallbackValue: string, callback: unknown): void;
static type: 'backend';
}
Additional Details
- Last updated: Tue, 06 Jul 2021 21:33:38 GMT
- Dependencies: @types/i18next
- Global values: none
Credits
These definitions were written by Nejc Drobnič.