Merge pull request #24621 from danielbischoff/master

node-polyglot: Added method *has* to interface
This commit is contained in:
Paul van Brenk
2018-04-04 11:21:51 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for node-polyglot v0.4.1
// Type definitions for node-polyglot v0.4.2
// Project: https://github.com/airbnb/polyglot.js
// Definitions by: Tim Jackson-Kiely <https://github.com/timjk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -38,6 +38,8 @@ declare class Polyglot {
locale(): string;
locale(locale: string): void;
has(phrase: string): boolean;
}
export = Polyglot;
@@ -47,6 +47,9 @@ function translate(): void {
_: "I like to write in %{language}.",
language: "Javascript"
});
polyglot.has("hello");
polyglot.has("world");
polyglot.replace({
"hello": "hey",