Skip to content

Commit

Permalink
Add missing 'has' method definition to node-polyglot (#2301)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayyow authored and gantoine committed May 31, 2018
1 parent df4911d commit 674bca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -18,6 +18,7 @@ declare module "node-polyglot" {
unset(idOrPhrases: string | Object): void,
clear(): void,
replace(phrases: Object): void,
has(key: string): boolean,

static transformPhrase(
phrase: string,
Expand Down
Expand Up @@ -24,6 +24,11 @@ instance.extend({ foo: "bar" });
// $ExpectError
instance.extend("foo");

instance.has("foo");

// $ExpectError
instance.has(1);

instance.t("foo").length;
instance.t("foo", {}).length;

Expand Down

0 comments on commit 674bca2

Please sign in to comment.