(operation: NewOperationInput)
| 184 | // -- Operations queue -- |
| 185 | |
| 186 | addOperation(operation: NewOperationInput): PendingOperation { |
| 187 | const id = `op-${++this.state.operationIdCounter}` |
| 188 | const newOp: PendingOperation = { |
| 189 | id, |
| 190 | type: operation.type, |
| 191 | params: operation.params, |
| 192 | description: operation.description, |
| 193 | command: operation.command, |
| 194 | status: 'pending', |
| 195 | createdAt: Date.now(), |
| 196 | dependsOn: operation.dependsOn, |
| 197 | } |
| 198 | this.state.operations.push(newOp) |
| 199 | return newOp |
| 200 | } |
| 201 | |
| 202 | addOperations(operations: NewOperationInput[]): PendingOperation[] { |
| 203 | return operations.map(op => this.addOperation(op)) |
no outgoing calls
no test coverage detected