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
@@ -235,7 +235,7 @@ module.exports = {
const normalizedPackageName = 'com.facebook.react.viewmanagers';
const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`;
const files = new Map();
const files = new Map<string, string>();
Object.keys(schema.modules).forEach(moduleName => {
const module = schema.modules[moduleName];
if (module.type !== 'Component') {