type Pattern = string;
type Extension = 'json' | 'yaml';
type ExportType = 'json' | 'yaml' | 'object';
interface Config {
    /**
     * specify the method return type
     * @default 'json'
     */
    exportType?: ExportType;
    /**
     * ignore files
     * @default: undefined
     */
    ignore?: Pattern[];
    /**
     * set the current working directory
     * @default: './'
     */
    cwd?: string;
    /**
     * set the output file path
     * @example 'dist/index.json'
     * @default undefined
     */
    export?: string;
    /**
     * set the input file extensions
     * @example ['json', 'yaml']
     * @default ['json']
     */
    extensions?: Extension[];
    /**
     * if true, index.json will not be spread
     * @default false
     */
    noSpreadIndex?: boolean;
}

interface ErrorReason {
    message: string;
    filePath: string;
}
declare class JsonFusionError extends Error {
    name: string;
    constructor(message: string, reasons: ErrorReason[]);
}

/**
 *
 * @param baseDir
 * @param config
 */
declare function jsonFusion(baseDir: string, config?: Config & {
    exportType?: 'json' | 'yaml';
}): Promise<string>;
/**
 *
 * @param baseDir
 * @param config
 */
declare function jsonFusion<T = unknown>(baseDir: string, config: Config & {
    exportType: 'object';
}): Promise<T>;

export { Config, JsonFusionError, jsonFusion };
