mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-03 19:29:03 -05:00
Merge pull request #19390 from Microsoft/fix19378
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