export declare const GeneratorErrorType: {
    readonly modifyConfig: "modifyConfig";
    readonly emitFile: "emitFile";
};
type GeneratorErrorType = (typeof GeneratorErrorType)[keyof typeof GeneratorErrorType];
export declare class GeneratorError extends Error {
    type: GeneratorErrorType;
    targetFile?: string;
    constructor(options: {
        type: GeneratorErrorType;
        message?: string;
        targetFile?: string;
    });
}
export declare function isGeneratorError(error: unknown): error is GeneratorError;
export declare function safely<T>(fn: () => T, options?: {
    fallback?: T;
    onError?: (err: unknown) => void;
}): Promise<T | undefined>;
export {};
