Repository: parcel-bundler/parcel
File: packages/core/types-internal/src/index.js (JavaScript)

Code before:
  targets?: {[string]: PackageTargetDescriptor, ...},
  dependencies?: PackageDependencies,
  devDependencies?: PackageDependencies,
  peerDependencies?: PackageDependencies,
  sideEffects?: boolean | FilePath | Array<FilePath>,
  bin?: string | {|[string]: FilePath|},
  ...
};

export type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'verbose';
export type BuildMode = 'development' | 'production' | string;
export type DetailedReportOptions = {|
  assetsPerBundle?: number,
|};

declare type GlobPattern = string;

export type InitialParcelOptionsInternal<WorkerFarm> = {|
  +entries?: FilePath | Array<FilePath>,
  +config?: DependencySpecifier,
  +defaultConfig?: DependencySpecifier,
  +env?: EnvMap,
  +targets?: ?(Array<string> | {+[string]: TargetDescriptor, ...}),

  +shouldDisableCache?: boolean,
  +cacheDir?: FilePath,
  +watchDir?: FilePath,
  +watchBackend?: BackendType,
  +watchIgnore?: Array<FilePath | GlobPattern>,
  +mode?: BuildMode,
  +hmrOptions?: ?HMROptions,
  +shouldContentHash?: boolean,
  +serveOptions?: InitialServerOptions | false,
  +shouldAutoInstall?: boolean,
  +logLevel?: LogLevel,
  +shouldProfile?: boolean,
  +shouldTrace?: boolean,
  +shouldPatchConsole?: boolean,
  +shouldBuildLazily?: boolean,
  +lazyIncludes?: string[],
  +lazyExcludes?: string[],
  +shouldBundleIncrementally?: boolean,
  +unstableFileInvalidations?: Array<Event>,

  +inputFS?: FileSystem,
  +outputFS?: FileSystem,
  +cache?: Cache,
  +workerFarm?: WorkerFarm,
  +packageManager?: PackageManager,
  +detailedReport?: ?DetailedReportOptions,


Review comment (performance):
Nice.. this was the main piece I was missing from my attempt at removing circular deps, how to avoid moving all the `WorkerFarm` related types our of WorkerFarm (and the complexity with there being a `class` as a type..)

Code after:
    [PackageName | FilePath | Glob]:
      | PackageName
      | FilePath
      | {|global: string|},
    ...
  },
  browserslist?: Array<string> | {[string]: Array<string>},
  engines?: Engines,
  targets?: {[string]: PackageTargetDescriptor, ...},
  dependencies?: PackageDependencies,
  devDependencies?: PackageDependencies,
  peerDependencies?: PackageDependencies,
  sideEffects?: boolean | FilePath | Array<FilePath>,
  bin?: string | {|[string]: FilePath|},
  ...
};

export type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'verbose';
export type BuildMode = 'development' | 'production' | string;
export type DetailedReportOptions = {|
  assetsPerBundle?: number,
|};

declare type GlobPattern = string;

export type InitialParcelOptionsInternal<WorkerFarm> = {|
  +entries?: FilePath | Array<FilePath>,
  +config?: DependencySpecifier,
  +defaultConfig?: DependencySpecifier,
  +env?: EnvMap,
  +targets?: ?(Array<string> | {+[string]: TargetDescriptor, ...}),

  +shouldDisableCache?: boolean,
  +cacheDir?: FilePath,
  +watchDir?: FilePath,
  +watchBackend?: BackendType,
  +watchIgnore?: Array<FilePath | GlobPattern>,
  +mode?: BuildMode,
  +hmrOptions?: ?HMROptions,
  +shouldContentHash?: boolean,
  +serveOptions?: InitialServerOptions | false,
  +shouldAutoInstall?: boolean,
  +logLevel?: LogLevel,
  +shouldProfile?: boolean,
  +shouldTrace?: boolean,
  +shouldPatchConsole?: boolean,
  +shouldBuildLazily?: boolean,
  +lazyIncludes?: string[],
  +lazyExcludes?: string[],
  +shouldBundleIncrementally?: boolean,
  +unstableFileInvalidations?: Array<Event>,