mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Check for --strict along with --noImplicitAny for code fix
This commit is contained in:
@@ -12,7 +12,8 @@ namespace ts.refactor.installTypesForPackage {
|
||||
registerRefactor(installTypesForPackage);
|
||||
|
||||
function getAvailableActions(context: RefactorContext): ApplicableRefactorInfo[] | undefined {
|
||||
if (context.program.getCompilerOptions().noImplicitAny) {
|
||||
const options = context.program.getCompilerOptions();
|
||||
if (options.noImplicitAny || options.strict) {
|
||||
// Then it will be available via `fixCannotFindModule`.
|
||||
return undefined;
|
||||
}
|
||||
@@ -60,4 +61,4 @@ namespace ts.refactor.installTypesForPackage {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user