From 185366ec2d23c82d4ddf5db271e5fa4fcbc83e67 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Mon, 18 Oct 2021 10:54:29 +0100 Subject: [PATCH] fix(nuxt3): correct compoennts hooks parameters types (#1157) --- packages/nuxt3/src/components/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nuxt3/src/components/types.ts b/packages/nuxt3/src/components/types.ts index 3df238ed90..8ed0ef7d68 100644 --- a/packages/nuxt3/src/components/types.ts +++ b/packages/nuxt3/src/components/types.ts @@ -39,14 +39,14 @@ export interface ComponentsDir extends ScanDir { transpile?: 'auto' | boolean } -type componentsDirHook = (dirs: ComponentsDir[]) => void | Promise -type componentsExtendHook = (components: (ComponentsDir | ScanDir)[]) => void | Promise - export interface Options { dirs: (string | ComponentsDir)[] loader: Boolean } +type componentsDirHook = (dirs: Options['dirs']) => void | Promise +type componentsExtendHook = (components: (Component | ComponentsDir | ScanDir)[]) => void | Promise + declare module '@nuxt/kit' { interface NuxtOptions { components: boolean | Options | Options['dirs']