[node-polyglot] Fix t and locale overloads to allow optional arguments (#31522)

* Updated node-polyglot types

* bumped package version
This commit is contained in:
Liam Ross
2018-12-19 10:13:12 -08:00
committed by Nathan Shively-Sanders
parent 1185d02265
commit 209bda9463
+4 -10
View File
@@ -1,9 +1,9 @@
// Type definitions for node-polyglot v0.4.2
// Type definitions for node-polyglot v0.4.3
// Project: https://github.com/airbnb/polyglot.js
// Definitions by: Tim Jackson-Kiely <https://github.com/timjk>
// Liam Ross <https://github.com/liamross>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Polyglot {
interface InterpolationOptions {
smart_count?: number | { length: number };
@@ -25,19 +25,13 @@ declare class Polyglot {
extend(phrases: any): void;
t(phrase: string): string;
t(phrase: string, smartCount: number): string;
t(phrase: string, interpolationOptions: Polyglot.InterpolationOptions): string;
t(phrase: string, options?: number | Polyglot.InterpolationOptions): string;
clear(): void;
replace(phrases: any): void;
locale(): string;
locale(locale: string): void;
locale(locale?: string): void;
has(phrase: string): boolean;
}