[jest] use default type params for mock and spy declarations (#20577)

This commit is contained in:
jwbay
2017-10-16 17:45:16 -04:00
committed by Andy
parent c5e5878777
commit 265c894983

View File

@@ -9,7 +9,7 @@
// Ika <https://github.com/ikatyang>
// Waseem Dahman <https://github.com/wsmd>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 2.3
declare var beforeAll: jest.Lifecycle;
declare var beforeEach: jest.Lifecycle;
@@ -488,12 +488,12 @@ declare namespace jest {
new (...args: any[]): any;
}
interface Mock<T> extends Function, MockInstance<T> {
interface Mock<T = {}> extends Function, MockInstance<T> {
new (...args: any[]): T;
(...args: any[]): any;
}
interface SpyInstance<T> extends MockInstance<T> {
interface SpyInstance<T = {}> extends MockInstance<T> {
mockRestore(): void;
}