From 334ff000e5b68ad0be0578058f8fb93077f3bb9a Mon Sep 17 00:00:00 2001 From: Naman Goel Date: Mon, 11 Dec 2023 23:33:28 -0800 Subject: [PATCH] Fix: type errors --- .../flow_modules/@babel/core/index.js.flow | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/babel-plugin/flow_modules/@babel/core/index.js.flow b/packages/babel-plugin/flow_modules/@babel/core/index.js.flow index b531252e..018730f8 100644 --- a/packages/babel-plugin/flow_modules/@babel/core/index.js.flow +++ b/packages/babel-plugin/flow_modules/@babel/core/index.js.flow @@ -301,14 +301,14 @@ export interface TransformOptions { * * Default: `[]` */ - plugins?: ?Array; + plugins?: ?$ReadOnlyArray; /** * List of presets (a set of plugins) to load and use * * Default: `[]` */ - presets?: ?Array; + presets?: ?$ReadOnlyArray; /** * 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) @@ -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 | PluginTarget - | [PluginTarget, PluginOptions] - | [PluginTarget, PluginOptions, string | void]; + | $ReadOnly<[PluginTarget, PluginOptions]> + | $ReadOnly<[PluginTarget, PluginOptions, string | void]>; declare export function resolvePlugin( name: string,