diff --git a/packages/vitest/src/integrations/vi.ts b/packages/vitest/src/integrations/vi.ts index 0d853b5608c7..ee73ce163d7e 100644 --- a/packages/vitest/src/integrations/vi.ts +++ b/packages/vitest/src/integrations/vi.ts @@ -191,11 +191,11 @@ export interface VitestUtils { * @param factory Mocked module factory. The result of this function will be an exports object */ // eslint-disable-next-line ts/method-signature-style - mock(path: string, factory?: MockFactoryWithHelper): void + mock(module: Promise, factory?: PromiseMockFactoryWithHelper): void // eslint-disable-next-line ts/method-signature-style mock(module: Promise, factory?: MockFactoryWithHelper): void // eslint-disable-next-line ts/method-signature-style - mock(module: Promise, factory?: PromiseMockFactoryWithHelper): void + mock(path: string, factory?: MockFactoryWithHelper): void /** * Removes module from mocked registry. All calls to import will return the original module even if it was mocked before. @@ -218,11 +218,11 @@ export interface VitestUtils { * @param factory Mocked module factory. The result of this function will be an exports object */ // eslint-disable-next-line ts/method-signature-style - doMock(path: string, factory?: MockFactoryWithHelper): void + doMock(module: Promise, factory?: PromiseMockFactoryWithHelper): void // eslint-disable-next-line ts/method-signature-style doMock(module: Promise, factory?: MockFactoryWithHelper): void // eslint-disable-next-line ts/method-signature-style - doMock(module: Promise, factory?: PromiseMockFactoryWithHelper): void + doMock(path: string, factory?: MockFactoryWithHelper): void /** * Removes module from mocked registry. All subsequent calls to import will return original module. *