source: trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/api.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/// <amd-module name="@angular/compiler-cli/ngcc/src/execution/cluster/api" />
9import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
10import { JsonObject } from '../../packages/entry_point';
11import { PackageJsonChange } from '../../writing/package_json_updater';
12import { Task, TaskProcessingOutcome } from '../tasks/api';
13/** A message reporting that an unrecoverable error occurred. */
14export interface ErrorMessage extends JsonObject {
15 type: 'error';
16 error: string;
17}
18/** A message requesting the processing of a task. */
19export interface ProcessTaskMessage extends JsonObject {
20 type: 'process-task';
21 task: Task;
22}
23/**
24 * A message reporting the result of processing the currently assigned task.
25 *
26 * NOTE: To avoid the communication overhead, the task is not included in the message. Instead, the
27 * master is responsible for keeping a mapping of workers to their currently assigned tasks.
28 */
29export interface TaskCompletedMessage extends JsonObject {
30 type: 'task-completed';
31 outcome: TaskProcessingOutcome;
32 message: string | null;
33}
34/** A message listing the paths to transformed files about to be written to disk. */
35export interface TransformedFilesMessage extends JsonObject {
36 type: 'transformed-files';
37 files: AbsoluteFsPath[];
38}
39/** A message requesting the update of a `package.json` file. */
40export interface UpdatePackageJsonMessage extends JsonObject {
41 type: 'update-package-json';
42 packageJsonPath: AbsoluteFsPath;
43 changes: PackageJsonChange[];
44}
45/** The type of messages sent from cluster workers to the cluster master. */
46export declare type MessageFromWorker = ErrorMessage | TaskCompletedMessage | TransformedFilesMessage | UpdatePackageJsonMessage;
47/** The type of messages sent from the cluster master to cluster workers. */
48export declare type MessageToWorker = ProcessTaskMessage;
Note: See TracBrowser for help on using the repository browser.