import { WebpackGenius } from '../WebpackGenius';
import { RuleSetRule, RuleSetCondition, RuleSetLoader } from 'webpack';
export declare abstract class RuleHandle<T = any> {
    protected readonly genius: WebpackGenius;
    private status;
    protected rule: RuleSetRule & {
        use?: RuleSetLoader[];
    };
    constructor(genius: WebpackGenius);
    protected onInit(): void;
    removeLoader(name: string): this;
    addLoaderBefore(loader: RuleSetLoader, beforeLoaderName?: string): this;
    addLoaderAfter(loader: RuleSetLoader, afterLoaderName?: string): this;
    enable(enable: boolean): this;
    isUsed(): boolean;
    setInclude(value: RuleSetCondition): this;
    setExclude(value: RuleSetCondition): this;
    setOptions<U extends keyof T>(loaderName: U, fn: (options: Partial<T[U]>) => Partial<T[U]> | void): this;
    disableLoader(loaderName: keyof T): this;
    protected abstract test(): RuleSetCondition;
    protected abstract loaders(): RuleSetLoader[];
    protected exclude(): RuleSetCondition | undefined;
    protected include(): RuleSetCondition | undefined;
    protected collect(): RuleSetRule;
    protected exists(loader?: string): boolean;
    protected isLoaderEqual(loader?: string, search?: keyof T | string): boolean;
}
