Implicit instantiation codemod

Summary:
This diff adds explicit type arguments to polymorphic function calls that do not constrain their types. This codemod will reduce the error burden that will come in a future version of flow.

This specific diff was generated by running:
```
flow codemod annotate-implicit-instantiations --write .
flow --json --pretty | jq '.errors | .[] | .message | .[] | .loc |.source' | sort | uniq | sed -e 's/"//g' | xargs hg revert
hg st -n | xargs grep "generated" | sed -e 's/:.*//g' | xargs hg revert
arc f
```

So these are the codemod results that introduced no new errors and no generated files.

Changelog: [Internal]

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D40413074

fbshipit-source-id: 42b52719978f1098169662b503dbcfd8cefdad53
This commit is contained in:
Jordan Brown
2022-10-19 10:25:09 -07:00
committed by Facebook GitHub Bot
parent b0f7b0c66b
commit 7884f6cfec
11 changed files with 20 additions and 18 deletions
@@ -373,7 +373,7 @@ module.exports = {
packageName?: string,
assumeNonnull: boolean = false,
): FilesOutput {
const files = new Map();
const files = new Map<string, string>();
const nativeModules = getModules(schema);
const normalizedPackageName =