Skip to content

Commit

Permalink
refactor(compiler-cli): Remove any cast for CompilerHost (#37079)
Browse files Browse the repository at this point in the history
This commit removes the FIXME for casting CompilerHost to any since
google3 is now already on TS 3.8.

PR Close #37079
  • Loading branch information
Keen Yee Liau authored and AndrewKushnir committed Jun 26, 2020
1 parent ad6680f commit cf46a87
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/compiler-cli/src/ngtsc/util/src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ export function resolveModuleName(
compilerHost: ts.ModuleResolutionHost&Pick<ts.CompilerHost, 'resolveModuleNames'>,
moduleResolutionCache: ts.ModuleResolutionCache|null): ts.ResolvedModule|undefined {
if (compilerHost.resolveModuleNames) {
// FIXME: Additional parameters are required in TS3.6, but ignored in 3.5.
// Remove the any cast once google3 is fully on TS3.6.
return (compilerHost as any)
.resolveModuleNames([moduleName], containingFile, undefined, undefined, compilerOptions)[0];
return compilerHost.resolveModuleNames(
[moduleName], containingFile,
undefined, // reusedNames
undefined, // redirectedReference
compilerOptions)[0];
} else {
return ts
.resolveModuleName(
Expand Down

0 comments on commit cf46a87

Please sign in to comment.