UNPKG

1.57 kBTypeScriptView Raw
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 */
8import ts from 'typescript';
9import { ParsedConfiguration } from './perform_compile';
10import * as api from './transformers/api';
11type TsickleModule = typeof import('tsickle');
12export declare function main(args: string[], consoleError?: (s: string) => void, config?: NgcParsedConfiguration, customTransformers?: api.CustomTransformers, programReuse?: {
13 program: api.Program | undefined;
14}, modifiedResourceFiles?: Set<string> | null, tsickle?: TsickleModule): number;
15export declare function mainDiagnosticsForTest(args: string[], config?: NgcParsedConfiguration, programReuse?: {
16 program: api.Program | undefined;
17}, modifiedResourceFiles?: Set<string> | null, tsickle?: TsickleModule): {
18 exitCode: number;
19 diagnostics: ReadonlyArray<ts.Diagnostic>;
20};
21export interface NgcParsedConfiguration extends ParsedConfiguration {
22 watch?: boolean;
23}
24export declare function readNgcCommandLineAndConfiguration(args: string[]): NgcParsedConfiguration;
25export declare function readCommandLineAndConfiguration(args: string[], existingOptions?: api.CompilerOptions, ngCmdLineOptions?: string[]): ParsedConfiguration;
26export declare function watchMode(project: string, options: api.CompilerOptions, consoleError: (s: string) => void): {
27 close: () => void;
28 ready: (cb: () => void) => void;
29 firstCompileResult: readonly ts.Diagnostic[];
30};
31export {};