line_push/node_modules/@nuxt/components/dist/scan.d.ts
2022-07-17 13:16:16 +08:00

23 lines
707 B
TypeScript

export interface ScanDir {
path: string;
pattern?: string | string[];
ignore?: string[];
prefix?: string;
global?: boolean | 'dev';
extendComponent?: (component: Component) => Promise<Component | void> | (Component | void);
}
export interface Component {
pascalName: string;
kebabName: string;
import: string;
asyncImport: string;
export: string;
filePath: string;
shortPath: string;
async?: boolean;
chunkName: string;
global: boolean;
}
export declare function scanComponents(dirs: ScanDir[], srcDir: string): Promise<Component[]>;
export declare function matcher(tags: string[], components: Component[]): Component[];