Add extra flowtype stubs for metro (#20429)

Summary:
We ignore some `metro` flowtypes, which made `flow check` fail on `metro-config`. I now also added the `metro` stubs needed by `metro-config` to make `flow check` pass.

Closes https://github.com/facebook/react-native/issues/20431

Pull Request resolved: https://github.com/facebook/react-native/pull/20429

Reviewed By: hramos

Differential Revision: D9036903

Pulled By: CompuIves

fbshipit-source-id: 6e348e929b7c36520787bb860f5a18aa588455c3
This commit is contained in:
Ives van Hoorne
2018-07-27 20:31:20 -07:00
committed by Facebook Github Bot
parent 40f6998b67
commit 9176fc00b5
3 changed files with 43 additions and 3 deletions

View File

@@ -129,7 +129,9 @@ const defaultRNConfig = {
*/
async function getCliConfig(): Promise<RNConfig> {
const cliArgs = minimist(process.argv.slice(2));
const config = await Config.load(path.resolve(__dirname, cliArgs.config));
const config = await Config.load(
cliArgs.config != null ? path.resolve(__dirname, cliArgs.config) : null,
);
config.transformer.assetRegistryPath = ASSET_REGISTRY_PATH;
config.resolver.hasteImplModulePath = defaultConfig.hasteImplModulePath;