refactor(compiler-cli): Remove any cast for CompilerHost (#37079)

This commit removes the FIXME for casting CompilerHost to any since
google3 is now already on TS 3.8.

PR Close #37079
This commit is contained in:
Keen Yee Liau 2020-05-12 13:23:05 -07:00 committed by Andrew Kushnir
parent c942662d79
commit e0eeb4afcb
1 changed files with 5 additions and 4 deletions

View File

@ -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(