From b9182d1dc3fbc8ee8475d4e2923a92b051338c75 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 23 Oct 2017 15:12:17 -0700 Subject: [PATCH] Check for noImplicitAny + strict correctelly --- src/services/refactors/installTypesForPackage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/refactors/installTypesForPackage.ts b/src/services/refactors/installTypesForPackage.ts index 5edc5570710..b0abe3963f4 100644 --- a/src/services/refactors/installTypesForPackage.ts +++ b/src/services/refactors/installTypesForPackage.ts @@ -13,7 +13,8 @@ namespace ts.refactor.installTypesForPackage { function getAvailableActions(context: RefactorContext): ApplicableRefactorInfo[] | undefined { const options = context.program.getCompilerOptions(); - if (options.noImplicitAny || options.strict) { + const noImplicitAny = options.noImplicitAny === undefined ? options.strict : options.noImplicitAny; + if (noImplicitAny) { // Then it will be available via `fixCannotFindModule`. return undefined; }