1 | /// <amd-module name="@angular/compiler-cli/ngcc/src/packages/ngcc_compiler_host" />
|
---|
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 | */
|
---|
9 | import * as ts from 'typescript';
|
---|
10 | import { AbsoluteFsPath, FileSystem, NgtscCompilerHost } from '../../../src/ngtsc/file_system';
|
---|
11 | import { EntryPointFileCache } from './source_file_cache';
|
---|
12 | /**
|
---|
13 | * Represents a compiler host that resolves a module import as a JavaScript source file if
|
---|
14 | * available, instead of the .d.ts typings file that would have been resolved by TypeScript. This
|
---|
15 | * is necessary for packages that have their typings in the same directory as the sources, which
|
---|
16 | * would otherwise let TypeScript prefer the .d.ts file instead of the JavaScript source file.
|
---|
17 | */
|
---|
18 | export declare class NgccSourcesCompilerHost extends NgtscCompilerHost {
|
---|
19 | private cache;
|
---|
20 | private moduleResolutionCache;
|
---|
21 | protected packagePath: AbsoluteFsPath;
|
---|
22 | constructor(fs: FileSystem, options: ts.CompilerOptions, cache: EntryPointFileCache, moduleResolutionCache: ts.ModuleResolutionCache, packagePath: AbsoluteFsPath);
|
---|
23 | getSourceFile(fileName: string, languageVersion: ts.ScriptTarget): ts.SourceFile | undefined;
|
---|
24 | resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ts.ResolvedProjectReference): Array<ts.ResolvedModule | undefined>;
|
---|
25 | }
|
---|
26 | /**
|
---|
27 | * A compiler host implementation that is used for the typings program. It leverages the entry-point
|
---|
28 | * cache for source files and module resolution, as these results can be reused across the sources
|
---|
29 | * program.
|
---|
30 | */
|
---|
31 | export declare class NgccDtsCompilerHost extends NgtscCompilerHost {
|
---|
32 | private cache;
|
---|
33 | private moduleResolutionCache;
|
---|
34 | constructor(fs: FileSystem, options: ts.CompilerOptions, cache: EntryPointFileCache, moduleResolutionCache: ts.ModuleResolutionCache);
|
---|
35 | getSourceFile(fileName: string, languageVersion: ts.ScriptTarget): ts.SourceFile | undefined;
|
---|
36 | resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ts.ResolvedProjectReference): Array<ts.ResolvedModule | undefined>;
|
---|
37 | }
|
---|