From 23516af7bc0b3e84675e21d2afb3d680da80eb72 Mon Sep 17 00:00:00 2001 From: Bradley Ayers Date: Wed, 21 Mar 2018 12:01:32 +1100 Subject: [PATCH] Update Jest types Fix `MatcherUtils.utils.EXPECTED_COLOR` and `MatcherUtils.utils.RECEIVED_COLOR` to be functions. --- types/jest/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 80957f32ad..c0ab376ae5 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -11,6 +11,7 @@ // Jamie Mason // Douglas Duteil // Ahn +// Bradley Ayers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -230,8 +231,8 @@ declare namespace jest { interface MatcherUtils { readonly isNot: boolean; utils: { - readonly EXPECTED_COLOR: string; - readonly RECEIVED_COLOR: string; + readonly EXPECTED_COLOR: (text: string) => string; + readonly RECEIVED_COLOR: (text: string) => string; ensureActualIsNumber(actual: any, matcherName?: string): void; ensureExpectedIsNumber(actual: any, matcherName?: string): void; ensureNoExpected(actual: any, matcherName?: string): void;