Home > @microsoft/rush-lib > Operation
Operation class
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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.
Signature:
export declare class Operation
Constructors
Constructor | Modifiers | Description |
|---|---|---|
(ALPHA) Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| (ALPHA) The Rush phase associated with this Operation | ||
| (ALPHA) The Rush project associated with this Operation | ||
| ReadonlySet<Operation> | (ALPHA) A set of all operations which depend on this operation. | |
| ReadonlySet<Operation> | (ALPHA) A set of all dependencies which must be executed before this operation is complete. | |
boolean | (ALPHA) 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. | ||
| boolean | (ALPHA) If set to true, this operation is considered a no-op and can be considered always skipped for analysis purposes. | |
string | (ALPHA) 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 | ||
| string | (ALPHA) The name of this operation, for logging. | |
IOperationRunner | undefined | (ALPHA) When the scheduler is ready to process this | ||
IOperationSettings | undefined | (ALPHA) Get the operation settings for this operation, defaults to the values defined in the project configuration. | ||
number | (ALPHA) The weight for this operation. This scalar is the contribution of this operation to the |