2.5.0 • Published 6 months ago
@types/node-polyglot v2.5.0
Installation
npm install --save @types/node-polyglot
Summary
This package contains type definitions for node-polyglot (https://github.com/airbnb/polyglot.js).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-polyglot.
index.d.ts
// Type definitions for node-polyglot v2.4.0
// Project: https://github.com/airbnb/polyglot.js
// Definitions by: Tim Jackson-Kiely <https://github.com/timjk>
// Liam Ross <https://github.com/liamross>
// Michael Mok <https://github.com/pmmmwh>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Polyglot {
interface InterpolationOptions {
smart_count?: number | { length: number } | undefined;
_?: string | undefined;
[interpolationKey: string]: any;
}
interface InterpolationTokenOptions {
prefix?: string | undefined;
suffix?: string | undefined;
}
interface PluralRules {
pluralTypes: {[lang: string]: (n: number) => number};
pluralTypeToLanguages: {[lang: string]: string[]};
}
interface PolyglotOptions {
phrases?: any;
locale?: string | undefined;
allowMissing?: boolean | undefined;
onMissingKey?: ((key: string, options: Polyglot.InterpolationOptions, locale: string) => string) | undefined;
warn?: ((message: string) => void) | undefined;
interpolation?: InterpolationTokenOptions | undefined;
pluralRules?: PluralRules | undefined;
}
function transformPhrase(phrase: string, options?: number | Polyglot.InterpolationOptions, locale?: string): string;
}
declare class Polyglot {
constructor(options?: Polyglot.PolyglotOptions);
extend(phrases: any, prefix?: string): void;
t(phrase: string, options?: number | Polyglot.InterpolationOptions): string;
clear(): void;
replace(phrases: any): void;
locale(locale?: string): string;
has(phrase: string): boolean;
unset(phrases: any, prefix?: string): void;
}
export = Polyglot;
Additional Details
- Last updated: Thu, 08 Jul 2021 18:51:23 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Tim Jackson-Kiely, Liam Ross, and Michael Mok.
2.5.0
6 months ago
2.4.3
8 months ago
2.4.5
6 months ago
2.4.4
7 months ago
2.4.2
3 years ago
2.4.1
4 years ago
2.4.0
4 years ago
0.4.34
5 years ago
0.4.33
5 years ago
0.4.32
5 years ago
0.4.31
6 years ago
0.4.30
7 years ago
0.4.29
8 years ago
0.4.28
8 years ago
0.4.27-alpha
8 years ago
0.4.26-alpha
8 years ago
0.4.25-alpha
8 years ago
0.4.24-alpha
8 years ago
0.4.23-alpha
8 years ago
0.4.22-alpha
8 years ago
0.4.21-alpha
8 years ago
0.4.16-alpha
8 years ago
0.4.15-alpha
8 years ago