import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
import type { IPhase } from '../../api/CommandLineConfiguration';
import type { IOperationRunner } from './IOperationRunner';
import type { IOperationSettings } from '../../api/RushProjectConfiguration';
/**
 * Options for constructing a new Operation.
 * @alpha
 */
export interface IOperationOptions {
    /**
     * The Rush phase associated with this Operation
     */
    phase: IPhase;
    /**
     * The Rush project associated with this Operation
     */
    project: RushConfigurationProject;
    /**
     * When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
     * running the operation.
     */
    runner?: IOperationRunner | undefined;
    /**
     * Settings defined in the project configuration for this operation, can be overridden.
     */
    settings?: IOperationSettings | undefined;
    /**
     * {@inheritDoc Operation.logFilenameIdentifier}
     */
    logFilenameIdentifier: string;
}
/**
 * The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
 * `OperationExecutionManager`. Each `Operation` has a `runner` member of type `IOperationRunner`, whose
 * implementation manages the actual process of running a single operation.
 *
 * The graph of `Operation` instances will be cloned into a separate execution graph after processing.
 *
 * @alpha
 */
export declare class Operation {
    /**
     * The Rush phase associated with this Operation
     */
    readonly associatedPhase: IPhase;
    /**
     * The Rush project associated with this Operation
     */
    readonly associatedProject: RushConfigurationProject;
    /**
     * A set of all operations which depend on this operation.
     */
    readonly consumers: ReadonlySet<Operation>;
    /**
     * A set of all dependencies which must be executed before this operation is complete.
     */
    readonly dependencies: ReadonlySet<Operation>;
    /**
     * This property is used in the name of the filename for the logs generated by this
     * operation. This is a filesystem-safe version of the phase name. For example,
     * an operation for a phase with name `_phase:compile` has a `logFilenameIdentifier` of `_phase_compile`.
     */
    logFilenameIdentifier: string;
    /**
     * When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
     * running the operation.
     */
    runner: IOperationRunner | undefined;
    /**
     * The weight for this operation. This scalar is the contribution of this operation to the
     * `criticalPathLength` calculation above. Modify to indicate the following:
     * - `weight` === 1: indicates that this operation has an average duration
     * - `weight` &gt; 1: indicates that this operation takes longer than average and so the scheduler
     *     should try to favor starting it over other, shorter operations. An example might be an operation that
     *     bundles an entire application and runs whole-program optimization.
     * - `weight` &lt; 1: indicates that this operation takes less time than average and so the scheduler
     *     should favor other, longer operations over it. An example might be an operation to unpack a cached
     *     output, or an operation using NullOperationRunner, which might use a value of 0.
     */
    weight: number;
    /**
     * Get the operation settings for this operation, defaults to the values defined in
     *  the project configuration.
     */
    settings: IOperationSettings | undefined;
    /**
     * If set to false, this operation will be skipped during evaluation (return OperationStatus.Skipped).
     * This is useful for plugins to alter the scope of the operation graph across executions,
     * e.g. to enable or disable unit test execution, or to include or exclude dependencies.
     */
    enabled: boolean;
    constructor(options: IOperationOptions);
    /**
     * The name of this operation, for logging.
     */
    get name(): string;
    /**
     * If set to true, this operation is considered a no-op and can be considered always skipped for analysis purposes.
     */
    get isNoOp(): boolean;
    /**
     * Adds the specified operation as a dependency and updates the consumer list.
     */
    addDependency(dependency: Operation): void;
    /**
     * Deletes the specified operation as a dependency and updates the consumer list.
     */
    deleteDependency(dependency: Operation): void;
}
//# sourceMappingURL=Operation.d.ts.map