Skip to content

Commit

Permalink
Fix: type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nmn committed Dec 12, 2023
1 parent 9b9e08c commit 334ff00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/babel-plugin/flow_modules/@babel/core/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ export interface TransformOptions {
*
* Default: `[]`
*/
plugins?: ?Array<PluginItem>;
plugins?: ?$ReadOnlyArray<PluginItem>;

/**
* List of presets (a set of plugins) to load and use
*
* Default: `[]`
*/
presets?: ?Array<PluginItem>;
presets?: ?$ReadOnlyArray<PluginItem>;

/**
* Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE**: This will not retain the columns)
Expand Down Expand Up @@ -685,19 +685,19 @@ export interface ConfigItem {
};
}

export type PluginOptions = { [string]: mixed } | void | false;
export type PluginOptions = $ReadOnly<{ [string]: mixed }> | void | false;

export type PluginTarget =
| string
| { [string]: mixed }
| $ReadOnly<{ [string]: mixed }>
| ((...args: any[]) => any);

export type PluginItem =
| ConfigItem
| PluginObj<any>
| PluginTarget
| [PluginTarget, PluginOptions]
| [PluginTarget, PluginOptions, string | void];
| $ReadOnly<[PluginTarget, PluginOptions]>
| $ReadOnly<[PluginTarget, PluginOptions, string | void]>;

declare export function resolvePlugin(
name: string,
Expand Down

0 comments on commit 334ff00

Please sign in to comment.