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') }