mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Check for --strict along with --noImplicitAny for code fix
This commit is contained in:
parent
809674d66e
commit
97eabde79d
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user