source: trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/locking/sync_locker.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.2 KB
Line 
1/// <amd-module name="@angular/compiler-cli/ngcc/src/locking/sync_locker" />
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 { LockFile } from './lock_file';
10/**
11 * SyncLocker is used to prevent more than one instance of ngcc executing at the same time,
12 * when being called in a synchronous context.
13 *
14 * * When ngcc starts executing, it creates a file in the `compiler-cli/ngcc` folder.
15 * * If it finds one is already there then it fails with a suitable error message.
16 * * When ngcc completes executing, it removes the file so that future ngcc executions can start.
17 */
18export declare class SyncLocker {
19 private lockFile;
20 constructor(lockFile: LockFile);
21 /**
22 * Run the given function guarded by the lock file.
23 *
24 * @param fn the function to run.
25 * @returns the value returned from the `fn` call.
26 */
27 lock<T>(fn: () => T): T;
28 /**
29 * Write a lock file to disk, or error if there is already one there.
30 */
31 protected create(): void;
32 /**
33 * The lock-file already exists so raise a helpful error.
34 */
35 protected handleExistingLockFile(): void;
36}
Note: See TracBrowser for help on using the repository browser.