From a564316d165ad4cdb51dd051df3c93b7e22d8a4a Mon Sep 17 00:00:00 2001 From: Nidin Vinayakan Date: Sat, 25 Jan 2020 11:45:41 +0100 Subject: [PATCH] Aligned with jest Matchers interface type (#72) * Aligned with jest Matchers interface type * Jest interface has extra T type paramter * Aligned with jest Matchers interface type * Added type parameter T to toBeTypeOf.ts * doc(package.json): contributors updated * Contributors section of package.json is updated with a new contributor --- package.json | 5 +++++ src/toBeTypeOf.ts | 2 +- src/toMatchOneOf.ts | 2 +- src/toMatchShapeOf.ts | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e8def61..bd7790e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,11 @@ "name" : "skmdev", "email" : "skmdev29@gmail.com", "url" : "https://github.com/skmdev" + }, + { + "name" : "Nidin Vinayakan", + "email" : "01@01alchemist.com", + "url" : "https://github.com/nidin" } ], "dependencies": { diff --git a/src/toBeTypeOf.ts b/src/toBeTypeOf.ts index f80e585..0e691da 100644 --- a/src/toBeTypeOf.ts +++ b/src/toBeTypeOf.ts @@ -5,7 +5,7 @@ import MatcherUtils = jest.MatcherUtils declare global { namespace jest { - interface Matchers { + interface Matchers { toBeTypeOf(expected: any): R, // tslint:disable-line:no-any } } diff --git a/src/toMatchOneOf.ts b/src/toMatchOneOf.ts index 9c25597..2cb65b6 100644 --- a/src/toMatchOneOf.ts +++ b/src/toMatchOneOf.ts @@ -10,7 +10,7 @@ import MatcherUtils = jest.MatcherUtils declare global { namespace jest { - interface Matchers { + interface Matchers { toMatchOneOf(expected: Array): R, // tslint:disable-line:no-any } } diff --git a/src/toMatchShapeOf.ts b/src/toMatchShapeOf.ts index b7e12e5..fa0e295 100644 --- a/src/toMatchShapeOf.ts +++ b/src/toMatchShapeOf.ts @@ -4,7 +4,7 @@ import MatcherUtils = jest.MatcherUtils declare global { namespace jest { - interface Matchers { + interface Matchers { toMatchShapeOf(expected: any): R, // tslint:disable-line:no-any } }