fix(extend): improve signature of interface ExpectExtendMap (#27124)

Jest custom matcher support both `string` and `() => string` for message property
> d3a6a7400a/packages/expect/src/index.js (L351)
This commit is contained in:
Davin Kevin
2018-07-09 20:18:03 +02:00
committed by Ryan Cavanaugh
parent 3500f2e9ea
commit 215834ee2f

View File

@@ -342,7 +342,7 @@ declare namespace jest {
}
interface ExpectExtendMap {
[key: string]: (this: MatcherUtils, received: any, ...actual: any[]) => { message(): string, pass: boolean } | Promise<{ message(): string, pass: boolean }>;
[key: string]: (this: MatcherUtils, received: any, ...actual: any[]) => { message(): string | (() => string), pass: boolean } | Promise<{ message(): string, pass: boolean }>;
}
interface SnapshotSerializerOptions {