From b327450b222eda52a404f846e9a7a2d45b59a1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 14 Feb 2019 09:07:32 +0100 Subject: [PATCH] revert @types/jest change --- package-lock.json | 6 +++--- package.json | 2 +- src/util/testing.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index fdeefe8f61..0988fc44d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -570,9 +570,9 @@ } }, "@types/jest": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.0.tgz", - "integrity": "sha512-kOafJnUTnMd7/OfEO/x3I47EHswNjn+dbz9qk3mtonr1RvKT+1FGVxnxAx08I9K8Tl7j9hpoJRE7OCf+t10fng==", + "version": "23.3.10", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.10.tgz", + "integrity": "sha512-DC8xTuW/6TYgvEg3HEXS7cu9OijFqprVDXXiOcdOKZCU/5PJNLZU37VVvmZHdtMiGOa8wAA/We+JzbdxFzQTRQ==", "dev": true }, "@types/js-yaml": { diff --git a/package.json b/package.json index 1d49812f4d..17493da252 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@types/buffer-from": "latest", "@types/cross-spawn": "latest", "@types/fs-extra": "latest", - "@types/jest": "24.x", + "@types/jest": "23.x", "@types/js-yaml": "latest", "@types/json5": "latest", "@types/lodash.memoize": "4.x", diff --git a/src/util/testing.ts b/src/util/testing.ts index 8741928c59..7e83fd76fd 100644 --- a/src/util/testing.ts +++ b/src/util/testing.ts @@ -1,4 +1,4 @@ -interface MockWithArgs extends Function, jest.MockInstance { +interface MockWithArgs extends Function, jest.MockInstance { new (...args: ArgumentsOf): T (...args: ArgumentsOf): any } @@ -8,7 +8,7 @@ type MethodKeysOf = { [K in keyof T]: T[K] extends Function ? K : never }[key // tslint:disable-next-line:ban-types type PropertyKeysOf = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T] type ArgumentsOf = T extends (...args: infer A) => any ? A : never -interface MockWithArgs extends Function, jest.MockInstance { +interface MockWithArgs extends Function, jest.MockInstance { new (...args: ArgumentsOf): T (...args: ArgumentsOf): any }