main.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031
  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. import ts from 'typescript';
  9. import { ParsedConfiguration } from './perform_compile';
  10. import * as api from './transformers/api';
  11. type TsickleModule = typeof import('tsickle');
  12. export 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;
  15. export 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. };
  21. export interface NgcParsedConfiguration extends ParsedConfiguration {
  22. watch?: boolean;
  23. }
  24. export declare function readNgcCommandLineAndConfiguration(args: string[]): NgcParsedConfiguration;
  25. export declare function readCommandLineAndConfiguration(args: string[], existingOptions?: api.CompilerOptions, ngCmdLineOptions?: string[]): ParsedConfiguration;
  26. export 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. };
  31. export {};