@types/i18next-node-fs-backend
TypeScript icon, indicating that this package has built-in type declarations

2.1.5 • Public • Published

Installation

npm install --save @types/i18next-node-fs-backend

Summary

This package contains type definitions for i18next-node-fs-backend (https://github.com/i18next/i18next-node-fs-backend).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/i18next-node-fs-backend.

index.d.ts

declare namespace I18next {
    interface I18nextOptions extends i18nextNodeFsBackEnd.I18nextOptions {}
}

declare namespace i18nextNodeFsBackEnd {
    /**
     * @summary Options for "i18next-node-fs-backend".
     * @interface
     */
    interface i18nextNodeFsBackEndOptions {
        /**
         * @summary Path where resources get loaded from.
         */
        loadPath: string;

        /**
         * @summary Path to post missing resources
         */
        addPath: string;

        /**
         * @summary jsonIndent to use when storing json files
         */
        jsonIndent: number;

        /**
         * @summary custom parser
         */
        parse?: ((data: any) => any) | undefined;
    }

    /**
     * @summary Options for "i18next".
     * @interface
     */
    interface I18nextOptions {
        backend?: i18nextNodeFsBackEndOptions | undefined;
    }
}

declare module "i18next-node-fs-backend" {
    import * as i18next from "i18next";

    class Backend implements i18next.BackendModule<i18nextNodeFsBackEnd.i18nextNodeFsBackEndOptions> {
        type: "backend";
        constructor(services?: any, options?: i18nextNodeFsBackEnd.i18nextNodeFsBackEndOptions);
        init(
            services: i18next.Services,
            backendOptions?: i18nextNodeFsBackEnd.i18nextNodeFsBackEndOptions,
            i18nextOptions?: i18next.InitOptions,
        ): void;
        read(language: string, namespace: string, callback: i18next.ReadCallback): void;
        create(languages: string[], namespace: string, key: string, fallbackValue: string): void;
    }

    const module: typeof Backend;
    export = module;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: i18next

Credits

These definitions were written by Cyril Schumacher, and Silas Rech.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/i18next-node-fs-backend

Weekly Downloads

5,874

Version

2.1.5

License

MIT

Unpacked Size

6.27 kB

Total Files

5

Last publish

Collaborators

  • types