From e0eeb4afcb68129c9b5079cde4274a2f0af741d6 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Tue, 12 May 2020 13:23:05 -0700 Subject: [PATCH] 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 --- packages/compiler-cli/src/ngtsc/util/src/typescript.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/compiler-cli/src/ngtsc/util/src/typescript.ts b/packages/compiler-cli/src/ngtsc/util/src/typescript.ts index ee64a577ec..13a90d3a3e 100644 --- a/packages/compiler-cli/src/ngtsc/util/src/typescript.ts +++ b/packages/compiler-cli/src/ngtsc/util/src/typescript.ts @@ -125,10 +125,11 @@ export function resolveModuleName( compilerHost: ts.ModuleResolutionHost&Pick, 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(