diff --git a/jest/index.d.ts b/jest/index.d.ts index b0b53625bb..9f945ba426 100644 --- a/jest/index.d.ts +++ b/jest/index.d.ts @@ -109,7 +109,7 @@ declare namespace jest { interface It { /** * Creates a test closure. - * + * * @param {string} name The name of your test * @param {fn?} ProvidesCallback The function for your test */ @@ -152,9 +152,9 @@ declare namespace jest { /** The `expect` function is used every time you want to test a value. You will rarely call `expect` by itself. */ interface Expect { - /** - * The `expect` function is used every time you want to test a value. You will rarely call `expect` by itself. - * + /** + * The `expect` function is used every time you want to test a value. You will rarely call `expect` by itself. + * * @param {any} actual The value to apply matchers against. */ (actual: any): Matchers; @@ -255,8 +255,8 @@ declare namespace jest { * myApi.myApiMethod.mockImplementation(() => "test"); */ type Mocked = { - [P in keyof T]: T[P] & MockInstance; - }; + [P in keyof T]: T[P] & MockInstance; + } & T; interface MockInstance { mock: MockContext; diff --git a/jest/jest-tests.ts b/jest/jest-tests.ts index 6b2124a6bd..a3d84a09e3 100644 --- a/jest/jest-tests.ts +++ b/jest/jest-tests.ts @@ -433,6 +433,7 @@ describe('strictNullChecks', function () { class TestApi { constructor() { }; testProp: boolean; + private anotherProp: string; testMethod(a: number): string { return ""; } }