diff --git a/types/node-polyglot/index.d.ts b/types/node-polyglot/index.d.ts index 7587f77640..dac678b7c6 100644 --- a/types/node-polyglot/index.d.ts +++ b/types/node-polyglot/index.d.ts @@ -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..0c84a3dea1 100644 --- a/types/node-polyglot/node-polyglot-tests.ts +++ b/types/node-polyglot/node-polyglot-tests.ts @@ -46,7 +46,10 @@ function translate(): void { polyglot.t("i_like_to_write_in_language", { _: "I like to write in %{language}.", language: "Javascript" - }); + }); + + polyglot.has("hello"); + polyglot.has("world"); polyglot.replace({ "hello": "hey",