source: trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/utils.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: 1.6 KB
Line 
1/// <amd-module name="@angular/compiler-cli/ngcc/src/entry_point_finder/utils" />
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 { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
10import { Logger } from '../../../src/ngtsc/logging';
11import { PathMappings } from '../path_mappings';
12/**
13 * Extract all the base-paths that we need to search for entry-points.
14 *
15 * This always contains the standard base-path (`sourceDirectory`).
16 * But it also parses the `paths` mappings object to guess additional base-paths.
17 *
18 * For example:
19 *
20 * ```
21 * getBasePaths('/node_modules', {baseUrl: '/dist', paths: {'*': ['lib/*', 'lib/generated/*']}})
22 * > ['/node_modules', '/dist/lib']
23 * ```
24 *
25 * Notice that `'/dist'` is not included as there is no `'*'` path,
26 * and `'/dist/lib/generated'` is not included as it is covered by `'/dist/lib'`.
27 *
28 * @param sourceDirectory The standard base-path (e.g. node_modules).
29 * @param pathMappings Path mapping configuration, from which to extract additional base-paths.
30 */
31export declare function getBasePaths(logger: Logger, sourceDirectory: AbsoluteFsPath, pathMappings: PathMappings | undefined): AbsoluteFsPath[];
32/**
33 * Run a task and track how long it takes.
34 *
35 * @param task The task whose duration we are tracking.
36 * @param log The function to call with the duration of the task.
37 * @returns The result of calling `task`.
38 */
39export declare function trackDuration<T = void>(task: () => T extends Promise<unknown> ? never : T, log: (duration: number) => void): T;
Note: See TracBrowser for help on using the repository browser.