From 9dbca95dbdf4d9b2ba4b0a5e603d9373eeba1642 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 29 Mar 2018 21:59:19 +0200 Subject: [PATCH] Node-Polyglot: Added method has to interface --- types/node-polyglot/index.d.ts | 2 ++ types/node-polyglot/node-polyglot-tests.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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",