flow-typed: Define minimist

Summary: Fixes a minor Flow type error when `minimist` is typed via `flow-typed`.

Reviewed By: TheSavior

Differential Revision: D13188680

fbshipit-source-id: 9ad35a3222c8937163a998a2751efd95945af3c7
This commit is contained in:
Tim Yung 2018-11-27 23:31:39 -08:00 committed by Facebook Github Bot
parent 4355b2df1b
commit 51d983bfa4
1 changed files with 3 additions and 7 deletions

View File

@ -18,13 +18,7 @@ const ios = require('./ios');
const wrapCommands = require('./wrapCommands');
const {ASSET_REGISTRY_PATH} = require('./Constants');
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
const flatten = require('lodash').flatten;
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
const minimist = require('minimist');
const path = require('path');
@ -128,7 +122,9 @@ const defaultRNConfig = {
async function getCliConfig(): Promise<RNConfig> {
const cliArgs = minimist(process.argv.slice(2));
const config = await Config.load(
cliArgs.config != null ? path.resolve(__dirname, cliArgs.config) : null,
typeof cliArgs.config === 'string'
? path.resolve(__dirname, cliArgs.config)
: null,
);
// $FlowFixMe Metro configuration is immutable.