mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
presuppress Flow v0.201 errors
Summary: Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D43720099 fbshipit-source-id: 6931548c90deb82cfc7e3d8173ccfc6aa7f0e1c8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
05454fa866
commit
b044ece594
@@ -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);
|
||||
|
||||
@@ -38,6 +38,7 @@ function createParserErrorCapturer(): [
|
||||
Array<ParserError>,
|
||||
ParserErrorCapturer,
|
||||
] {
|
||||
// $FlowFixMe[missing-empty-array-annot]
|
||||
const errors = [];
|
||||
function guard<T>(fn: () => T): ?T {
|
||||
try {
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user