1 | export interface Component {
|
2 | pascalName: string;
|
3 | kebabName: string;
|
4 | import: string;
|
5 | asyncImport: string;
|
6 | export: string;
|
7 | filePath: string;
|
8 | shortPath: string;
|
9 | async?: boolean;
|
10 | chunkName: string;
|
11 | global: boolean;
|
12 | level: number;
|
13 | }
|
14 | export interface ScanDir {
|
15 | path: string;
|
16 | pattern?: string | string[];
|
17 | ignore?: string[];
|
18 | prefix?: string;
|
19 | global?: boolean | 'dev';
|
20 | level?: number;
|
21 | extendComponent?: (component: Component) => Promise<Component | void> | (Component | void);
|
22 | }
|
23 | export interface ComponentsDir extends ScanDir {
|
24 | watch?: boolean;
|
25 | extensions?: string[];
|
26 | transpile?: 'auto' | boolean;
|
27 | }
|
28 | declare type componentsDirHook = (dirs: ComponentsDir[]) => void | Promise<void>;
|
29 | declare type componentsExtendHook = (components: (ComponentsDir | ScanDir)[]) => void | Promise<void>;
|
30 | export interface Options {
|
31 | dirs: (string | ComponentsDir)[];
|
32 | }
|
33 | declare module '@nuxt/types/config/index' {
|
34 | interface NuxtOptions {
|
35 | components: boolean | Options | Options['dirs'];
|
36 | }
|
37 | }
|
38 | declare module '@nuxt/types/config/hooks' {
|
39 | interface NuxtOptionsHooks {
|
40 | 'components:dirs'?: componentsDirHook;
|
41 | 'components:extend'?: componentsExtendHook;
|
42 | components?: {
|
43 | dirs?: componentsDirHook;
|
44 | extend?: componentsExtendHook;
|
45 | };
|
46 | }
|
47 | }
|
48 | export {};
|