Skip to content

Commit

Permalink
presuppress Flow v0.201 errors
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D43720099

fbshipit-source-id: 6931548c90deb82cfc7e3d8173ccfc6aa7f0e1c8
  • Loading branch information
mroch authored and facebook-github-bot committed Mar 2, 2023
1 parent 05454fa commit b044ece
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/Utilities/codegenNativeCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function codegenNativeCommands<T: interface {}>(options: Options<$Keys<T>>): T {
const commandObj: {[$Keys<T>]: (...$ReadOnlyArray<mixed>) => void} = {};

options.supportedCommands.forEach(command => {
// $FlowFixMe[missing-local-annot]
commandObj[command] = (ref, ...args) => {
// $FlowFixMe[incompatible-call]
dispatchCommand(ref, command, args);
Expand Down
3 changes: 3 additions & 0 deletions packages/react-native-codegen/src/parsers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function createParserErrorCapturer(): [
Array<ParserError>,
ParserErrorCapturer,
] {
// $FlowFixMe[missing-empty-array-annot]
const errors = [];
function guard<T>(fn: () => T): ?T {
try {
Expand All @@ -46,12 +47,14 @@ function createParserErrorCapturer(): [
if (!(error instanceof ParserError)) {
throw error;
}
// $FlowFixMe[incompatible-call]
errors.push(error);

return null;
}
}

// $FlowFixMe[incompatible-return]
return [errors, guard];
}

Expand Down

0 comments on commit b044ece

Please sign in to comment.