From dbf0e97953009e05c6a7beb319738a724365f4fd Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 14 Aug 2023 11:49:54 +0200 Subject: [PATCH] docs: fix return type for vi.fn --- docs/api/vi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/vi.md b/docs/api/vi.md index 0d6c7b0cbb38..c9328dbd5a8c 100644 --- a/docs/api/vi.md +++ b/docs/api/vi.md @@ -82,7 +82,7 @@ import { vi } from 'vitest' ## vi.fn -- **Type:** `(fn?: Function) => CallableMockInstance` +- **Type:** `(fn?: Function) => Mock` Creates a spy on a function, though can be initiated without one. Every time a function is invoked, it stores its call arguments, returns, and instances. Also, you can manipulate its behavior with [methods](/api/mock). If no function is given, mock will return `undefined`, when invoked.