mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
a7db8df207
commit
e7a4dbcefc
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user