mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-29 17:07:07 +08:00
* undertaker-registry initial commit. * Created index.d.ts for undertaker-registry * Created tslint.json for undertaker-registry * Created tests for undertaker-registry. * Create tslint.json * Moved v2 version and created initial files. * Updated types of i18next. * Locked versions for dependents. * Improved tests. * Fixed ts error. * Updated to backwards compatible naming. * Added missing event remover method. * Fixed tslint errors. * Added missing variables. * Added missing compatibilityJSON argument. * Fixed dtslint error. * Updated naming and implemented TranslationOptions. * Fixing and removed wrong implementation. Updating some comments. * Creted FormatFunction type. TranslationOptionsBase changed to TranslationOptions. * Updated interpolation options defaults in jsdocs. * Wrapped all @default values with single-quotes. * Updated FormatFunction type. Fixed tests. * Fixed dtslint errors. * Typescript 2.3 and changed to `object`. * Added TypeScript 2.3 support. * Added generics for TranslationFunction, `t` and `exists` methods. * Created TranslationResult type with default `string` generic value. * Added tests for generics. Updated return types for translation method. * Updated `parseMissingKeyHandler` return type. * TranslationFunction TResult default value changed to any. * Removed references and ts 2.3 version from i18next-express-middleware. * Removed reference and ts 2.3 version from i18next-node-fs-backend. * Removed reference and ts 2.3 version from i18next-sprintf-postprocessor. * Added mapping path to i18next/v2. * Created TranslationFunction interface. * Fixed dtslint errors. * Fixed `callable-types` tslint error. * Updated exists method type. * Fixed tests for `exists` method. * Removed ts 2.3 version and reference to i18next type.
57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
// Type definitions for i18next-node-fs-backend
|
|
// Project: https://github.com/i18next/i18next-node-fs-backend
|
|
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace I18next {
|
|
interface I18nextOptions extends i18nextNodeFsBackEnd.I18nextOptions { }
|
|
}
|
|
|
|
declare namespace i18nextNodeFsBackEnd {
|
|
/**
|
|
* @summary Options for "i18next-node-fs-backend".
|
|
* @interface
|
|
*/
|
|
interface i18nextNodeFsBackEndOptions {
|
|
// path where resources get loaded from
|
|
/**
|
|
* @summary Path where resources get loaded from.
|
|
* @type {string}
|
|
*/
|
|
loadPath: string;
|
|
|
|
/**
|
|
* @summary Path to post missing resources
|
|
* @type {string}
|
|
*/
|
|
addPath: string;
|
|
|
|
/**
|
|
* @summary jsonIndent to use when storing json files
|
|
* @type {number}
|
|
*/
|
|
//
|
|
jsonIndent: number;
|
|
}
|
|
|
|
/**
|
|
* @summary Options for "i18next".
|
|
* @interface
|
|
*/
|
|
interface I18nextOptions {
|
|
backend?: i18nextNodeFsBackEndOptions;
|
|
}
|
|
}
|
|
|
|
declare module "i18next-node-fs-backend" {
|
|
import * as i18next from "i18next";
|
|
|
|
class BackEnd {
|
|
constructor(services?: any, options?: Object);
|
|
init(options?: Object): void;
|
|
}
|
|
|
|
var out: typeof BackEnd;
|
|
export = out;
|
|
}
|