From 85c0a871d55172b0564ead700e87d5d4ee52704b Mon Sep 17 00:00:00 2001 From: Stepan Date: Fri, 10 Feb 2023 14:27:03 +0300 Subject: [PATCH] docs: change type for unableAutoUnmount (#1966) --- docs/api/index.md | 2 +- src/utils/autoUnmount.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 2cc8c3b3c..9b64592e6 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1886,7 +1886,7 @@ function shallowMount(Component, options?: MountingOptions): VueWrapper **Signature:** ```ts -enableAutoUnmount(hook: Function)); +enableAutoUnmount(hook: (callback: () => void) => void); disableAutoUnmount(): void; ``` diff --git a/src/utils/autoUnmount.ts b/src/utils/autoUnmount.ts index 5b81fa998..4ce24cd4e 100644 --- a/src/utils/autoUnmount.ts +++ b/src/utils/autoUnmount.ts @@ -9,7 +9,7 @@ export function disableAutoUnmount() { wrapperInstances.length = 0 } -export function enableAutoUnmount(hook: Function) { +export function enableAutoUnmount(hook: (callback: () => void) => void) { if (isEnabled) { throw new Error('enableAutoUnmount cannot be called more than once') }