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; }