diff --git a/.flowconfig b/.flowconfig index 0cac4b51657b4e..f63fddf53a8f7a 100644 --- a/.flowconfig +++ b/.flowconfig @@ -22,11 +22,15 @@ ; Ignore polyfills .*/Libraries/polyfills/.* +; Ignore metro +.*/node_modules/metro/.* + [include] [libs] Libraries/react-native/react-native-interface.js flow/ +flow-github/ [options] emoji=true diff --git a/flow-github/metro.js b/flow-github/metro.js new file mode 100644 index 00000000000000..8c81bc32a9562c --- /dev/null +++ b/flow-github/metro.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @flow + */ + +declare module 'metro' { + declare module.exports: any; +} + +declare module 'metro/src/lib/TerminalReporter' { + declare module.exports: any; +} + +declare module 'metro/src/HmrServer' { + declare module.exports: any; +} \ No newline at end of file diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index c3c02e7d8aa406..7d608958e5ffa8 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -16,11 +16,15 @@ ; Ignore polyfills .*/Libraries/polyfills/.* +; Ignore metro +.*/node_modules/metro/.* + [include] [libs] node_modules/react-native/Libraries/react-native/react-native-interface.js node_modules/react-native/flow/ +node_modules/react-native/flow-github/ [options] emoji=true