[6a3a178] | 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/src/transformers/program" />
|
---|
| 9 | import * as path from 'path';
|
---|
| 10 | import * as ts from 'typescript';
|
---|
| 11 | import { CompilerHost, CompilerOptions, Program } from './api';
|
---|
| 12 | export declare function setTempProgramHandlerForTest(handler: (program: ts.Program) => void): void;
|
---|
| 13 | export declare function resetTempProgramHandlerForTest(): void;
|
---|
| 14 | export declare function createProgram({ rootNames, options, host, oldProgram }: {
|
---|
| 15 | rootNames: ReadonlyArray<string>;
|
---|
| 16 | options: CompilerOptions;
|
---|
| 17 | host: CompilerHost;
|
---|
| 18 | oldProgram?: Program;
|
---|
| 19 | }): Program;
|
---|
| 20 | /**
|
---|
| 21 | * Returns a function that can adjust a path from source path to out path,
|
---|
| 22 | * based on an existing mapping from source to out path.
|
---|
| 23 | *
|
---|
| 24 | * TODO(tbosch): talk to the TypeScript team to expose their logic for calculating the `rootDir`
|
---|
| 25 | * if none was specified.
|
---|
| 26 | *
|
---|
| 27 | * Note: This function works on normalized paths from typescript but should always return
|
---|
| 28 | * POSIX normalized paths for output paths.
|
---|
| 29 | */
|
---|
| 30 | export declare function createSrcToOutPathMapper(outDir: string | undefined, sampleSrcFileName: string | undefined, sampleOutFileName: string | undefined, host?: {
|
---|
| 31 | dirname: typeof path.dirname;
|
---|
| 32 | resolve: typeof path.resolve;
|
---|
| 33 | relative: typeof path.relative;
|
---|
| 34 | }): (srcFileName: string) => string;
|
---|