diff --git a/types/node-polyglot/index.d.ts b/types/node-polyglot/index.d.ts index 7587f77640..3133def496 100644 --- a/types/node-polyglot/index.d.ts +++ b/types/node-polyglot/index.d.ts @@ -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 // 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; diff --git a/types/node-polyglot/node-polyglot-tests.ts b/types/node-polyglot/node-polyglot-tests.ts index bfb18339c0..14efa8ad30 100644 --- a/types/node-polyglot/node-polyglot-tests.ts +++ b/types/node-polyglot/node-polyglot-tests.ts @@ -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",