Skip to content

Commit

Permalink
Aligned with jest Matchers interface type (#72)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nidin authored and Dean177 committed Jan 25, 2020
1 parent a74659d commit a564316
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"name" : "skmdev",
"email" : "[email protected]",
"url" : "https://github.com/skmdev"
},
{
"name" : "Nidin Vinayakan",
"email" : "[email protected]",
"url" : "https://github.com/nidin"
}
],
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/toBeTypeOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import MatcherUtils = jest.MatcherUtils

declare global {
namespace jest {
interface Matchers<R> {
interface Matchers<R, T> {
toBeTypeOf(expected: any): R, // tslint:disable-line:no-any
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/toMatchOneOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import MatcherUtils = jest.MatcherUtils

declare global {
namespace jest {
interface Matchers<R> {
interface Matchers<R, T> {
toMatchOneOf(expected: Array<any>): R, // tslint:disable-line:no-any
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/toMatchShapeOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import MatcherUtils = jest.MatcherUtils

declare global {
namespace jest {
interface Matchers<R> {
interface Matchers<R, T> {
toMatchShapeOf(expected: any): R, // tslint:disable-line:no-any
}
}
Expand Down

0 comments on commit a564316

Please sign in to comment.