Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/i18next-fs-backend

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/i18next-fs-backend

TypeScript definitions for i18next-fs-backend

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
59K
increased by2.64%
Maintainers
1
Weekly downloads
 
Created
Source

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.

index.d.ts

// Type definitions for i18next-fs-backend 1.1
// Project: https://github.com/i18next/i18next-fs-backend
// Definitions by: Nejc Drobnič <https://github.com/quantumlyy>
//                 Jeroen "Favna" Claassens <https://github.com/favna>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Mon, 20 Sep 2021 19:01:20 GMT
  • Dependencies: @types/i18next
  • Global values: none

Credits

These definitions were written by Nejc Drobnič, and Jeroen "Favna" Claassens.

FAQs

Package last updated on 20 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc