mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
[node-polyglot] Fix t and locale overloads to allow optional arguments (#31522)
* Updated node-polyglot types * bumped package version
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
1185d02265
commit
209bda9463
Vendored
+4
-10
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user