UNPKG

1.59 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 * as ts from 'typescript';
9import type { Compiler } from 'webpack';
10import { InputFileSystem } from './ivy/system';
11type ResolverWithOptions = ReturnType<Compiler['resolverFactory']['get']>;
12export declare class NgccProcessor {
13 private readonly compilerNgcc;
14 private readonly propertiesToConsider;
15 private readonly compilationWarnings;
16 private readonly compilationErrors;
17 private readonly basePath;
18 private readonly tsConfigPath;
19 private readonly inputFileSystem;
20 private readonly resolver;
21 private _processedModules;
22 private _logger;
23 private _nodeModulesDirectory;
24 constructor(compilerNgcc: typeof import('@angular/compiler-cli/ngcc'), propertiesToConsider: string[], compilationWarnings: (Error | string)[], compilationErrors: (Error | string)[], basePath: string, tsConfigPath: string, inputFileSystem: InputFileSystem, resolver: ResolverWithOptions);
25 /** Process the entire node modules tree. */
26 process(): void;
27 /** Process a module and its dependencies. */
28 processModule(moduleName: string, resolvedModule: ts.ResolvedModule | ts.ResolvedTypeReferenceDirective): void;
29 invalidate(fileName: string): void;
30 /**
31 * Try resolve a package.json file from the resolved .d.ts file.
32 */
33 private tryResolvePackage;
34 private findNodeModulesDirectory;
35 private findPackageManagerLockFile;
36}
37export {};