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 * as ts from 'typescript';
|
---|
9 | import { NgccProcessor } from '../ngcc_processor';
|
---|
10 | import { WebpackResourceLoader } from '../resource_loader';
|
---|
11 | export declare function augmentHostWithResources(host: ts.CompilerHost, resourceLoader: WebpackResourceLoader, options?: {
|
---|
12 | directTemplateLoading?: boolean;
|
---|
13 | inlineStyleMimeType?: string;
|
---|
14 | inlineStyleFileExtension?: string;
|
---|
15 | }): void;
|
---|
16 | /**
|
---|
17 | * Augments a TypeScript Compiler Host's resolveModuleNames function to collect dependencies
|
---|
18 | * of the containing file passed to the resolveModuleNames function. This process assumes
|
---|
19 | * that consumers of the Compiler Host will only call resolveModuleNames with modules that are
|
---|
20 | * actually present in a containing file.
|
---|
21 | * This process is a workaround for gathering a TypeScript SourceFile's dependencies as there
|
---|
22 | * is no currently exposed public method to do so. A BuilderProgram does have a `getAllDependencies`
|
---|
23 | * function. However, that function returns all transitive dependencies as well which can cause
|
---|
24 | * excessive Webpack rebuilds.
|
---|
25 | *
|
---|
26 | * @param host The CompilerHost to augment.
|
---|
27 | * @param dependencies A Map which will be used to store file dependencies.
|
---|
28 | * @param moduleResolutionCache An optional resolution cache to use when the host resolves a module.
|
---|
29 | */
|
---|
30 | export declare function augmentHostWithDependencyCollection(host: ts.CompilerHost, dependencies: Map<string, Set<string>>, moduleResolutionCache?: ts.ModuleResolutionCache): void;
|
---|
31 | export declare function augmentHostWithNgcc(host: ts.CompilerHost, ngcc: NgccProcessor, moduleResolutionCache?: ts.ModuleResolutionCache): void;
|
---|
32 | export declare function augmentHostWithReplacements(host: ts.CompilerHost, replacements: Record<string, string>, moduleResolutionCache?: ts.ModuleResolutionCache): void;
|
---|
33 | export declare function augmentHostWithSubstitutions(host: ts.CompilerHost, substitutions: Record<string, string>): void;
|
---|
34 | export declare function augmentHostWithVersioning(host: ts.CompilerHost): void;
|
---|
35 | export declare function augmentProgramWithVersioning(program: ts.Program): void;
|
---|
36 | export declare function augmentHostWithCaching(host: ts.CompilerHost, cache: Map<string, ts.SourceFile>): void;
|
---|