fix(nuxt3): correct compoennts hooks parameters types (#1157)

This commit is contained in:
Xin Du (Clark) 2021-10-18 10:54:29 +01:00 committed by GitHub
parent cba4c4202b
commit 185366ec2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,14 +39,14 @@ export interface ComponentsDir extends ScanDir {
transpile?: 'auto' | boolean
}
type componentsDirHook = (dirs: ComponentsDir[]) => void | Promise<void>
type componentsExtendHook = (components: (ComponentsDir | ScanDir)[]) => void | Promise<void>
export interface Options {
dirs: (string | ComponentsDir)[]
loader: Boolean
}
type componentsDirHook = (dirs: Options['dirs']) => void | Promise<void>
type componentsExtendHook = (components: (Component | ComponentsDir | ScanDir)[]) => void | Promise<void>
declare module '@nuxt/kit' {
interface NuxtOptions {
components: boolean | Options | Options['dirs']