fix(compiler-cli): match wrapHost parameter types within plugin interface (#38004)

The `TscPlugin` interface using a type of `ts.CompilerHost&Partial<UnifiedModulesHost>` for the `host` parameter
of the `wrapHost` method. However, prior to this change, the interface implementing `NgTscPlugin` class used a
type of `ts.CompilerHost&UnifiedModulesHost` for the parameter. This change corrects the inconsistency and
allows `UnifiedModulesHost` members to be optional when using the `NgtscPlugin`.

PR Close #38004
This commit is contained in:
Charles Lyding 2020-07-10 12:41:35 -04:00 committed by Andrew Kushnir
parent f0766a4474
commit ba175be41f
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ export class NgTscPlugin implements TscPlugin {
}
wrapHost(
host: ts.CompilerHost&UnifiedModulesHost, inputFiles: readonly string[],
host: ts.CompilerHost&Partial<UnifiedModulesHost>, inputFiles: readonly string[],
options: ts.CompilerOptions): PluginCompilerHost {
// TODO(alxhub): Eventually the `wrapHost()` API will accept the old `ts.Program` (if one is
// available). When it does, its `ts.SourceFile`s need to be re-tagged to enable proper