unplugin-export-collector
Version:
Recursively get all named export from a file and out-of-the-box support unplugin-auto-import
27 lines (23 loc) • 826 B
TypeScript
import { E as ExpGeneratorOptions, a as ExpGeneratorDataOptions } from './shared/unplugin-export-collector.593a7007.js';
interface ExpCollectorOptions {
base?: string;
alias?: Record<string, string>;
}
declare function expCollector(path: string, options?: ExpCollectorOptions): Promise<string[]>;
interface ParseValue {
exp: string[];
refer: string[];
}
declare function parser(content: string): Promise<ParseValue>;
/**
* Entry
*/
declare function expGenerator(path: string, options?: Partial<ExpGeneratorOptions>): Promise<void>;
declare function expGeneratorData(path: string, options?: Partial<ExpGeneratorDataOptions>): Promise<{
data: string;
pkgContext: {
pkg: any;
isTs: boolean;
};
}>;
export { type ParseValue, expCollector, expGenerator, expGeneratorData, parser };