code: function assertPublicBundleOptions(bo: mixed): PublicBundleOptions {
    invariant(
      typeof bo === 'object' && bo != null,
      'bundle options must be an object',
    );
    invariant(
      // eslint-disable-next-line lint/strictly-null
      bo.dev === undefined || typeof bo.dev === 'boolean',
      'bundle options field `dev` must be a boolean',
    );
    const {entryFile} = bo;
    invariant(
      typeof entryFile === 'string',
      'bundle options must contain a string field `entryFile`',
    );
    invariant(
      // eslint-disable-next-line lint/strictly-null
      bo.inlineSourceMap === undefined || typeof bo.inlineSourceMap === 'boolean',
      'bundle options field `inlineSourceMap` must be a boolean',
    );
    invariant(
      // eslint-disable-next-line lint/strictly-null
      bo.minify === undefined || typeof bo.minify === 'boolean',
      'bundle options field `minify` must be a boolean',
    );
    invariant(
      // eslint-disable-next-line lint/strictly-null
      bo.platform === undefined || typeof bo.platform === 'string',
      'bundle options field `platform` must be a string',
    );
    invariant(
      // eslint-disable-next-line lint/strictly-null
      bo.runModule === undefined || typeof bo.runModule === 'boolean',
      'bundle options field `runModule` must be a boolean',
    );
    invariant(
      // eslint-disable-next-line lint/strictly-null
      bo.sourceMapUrl === undefined || typeof bo.sourceMapUrl === 'string',
      'bundle options field `sourceMapUrl` must be a boolean',
    );
    return {entryFile, ...bo};
  }
docs: This is a public API, so we don't trust the value and purposefully downgrade
  it as `mixed`. Because it understands `invariant`, Flow ensure that we
  refine these values completely.