source: trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/execution/tasks/completion.d.ts@ 6a3a178

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

initial commit

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/// <amd-module name="@angular/compiler-cli/ngcc/src/execution/tasks/completion" />
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9import { PathManipulation, ReadonlyFileSystem } from '../../../../src/ngtsc/file_system';
10import { Logger } from '../../../../src/ngtsc/logging';
11import { PackageJsonUpdater } from '../../writing/package_json_updater';
12import { Task, TaskCompletedCallback, TaskProcessingOutcome, TaskQueue } from './api';
13/**
14 * A function that can handle a specific outcome of a task completion.
15 *
16 * These functions can be composed using the `composeTaskCompletedCallbacks()`
17 * to create a `TaskCompletedCallback` function that can be passed to an `Executor`.
18 */
19export declare type TaskCompletedHandler = (task: Task, message: string | null) => void;
20/**
21 * Compose a group of TaskCompletedHandlers into a single TaskCompletedCallback.
22 *
23 * The compose callback will receive an outcome and will delegate to the appropriate handler based
24 * on this outcome.
25 *
26 * @param callbacks a map of outcomes to handlers.
27 */
28export declare function composeTaskCompletedCallbacks(callbacks: Record<TaskProcessingOutcome, TaskCompletedHandler>): TaskCompletedCallback;
29/**
30 * Create a handler that will mark the entry-points in a package as being processed.
31 *
32 * @param pkgJsonUpdater The service used to update the package.json
33 */
34export declare function createMarkAsProcessedHandler(fs: PathManipulation, pkgJsonUpdater: PackageJsonUpdater): TaskCompletedHandler;
35/**
36 * Create a handler that will throw an error.
37 */
38export declare function createThrowErrorHandler(fs: ReadonlyFileSystem): TaskCompletedHandler;
39/**
40 * Create a handler that logs an error and marks the task as failed.
41 */
42export declare function createLogErrorHandler(logger: Logger, fs: ReadonlyFileSystem, taskQueue: TaskQueue): TaskCompletedHandler;
Note: See TracBrowser for help on using the repository browser.