Add LTI annotations to function params in xplat/js [1/2]

Summary: Add annotations to function parameters required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predicatable.

Reviewed By: evanyeung

Differential Revision: D37353648

fbshipit-source-id: e5a0c685ced85a8ff353d578b373f836b376bb28
This commit is contained in:
Pieter Vanderwerff
2022-06-22 21:36:52 -07:00
committed by Facebook GitHub Bot
parent a7db8df207
commit e7a4dbcefc
74 changed files with 430 additions and 182 deletions
@@ -127,7 +127,7 @@ function serializeArg(
realTypeAnnotation = resolveAlias(realTypeAnnotation.name);
}
function wrap(callback) {
function wrap(callback: (val: string) => string) {
const val = `args[${index}]`;
const expression = callback(val);