From c775422827c9c92c5dfeb83feb91603488e5a3ac Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Tue, 13 Jun 2023 20:42:25 +1000 Subject: [PATCH] [webpack] Fix 0.208.x errors (#4456) --- .../flow_v0.201.x-/react-router-dom_v6.x.x.js | 2 +- .../webpack_v4.x.x/flow_v0.104.x-/webpack_v4.x.x.js | 12 +++++++----- .../webpack_v5.x.x/flow_v0.104.x-/webpack_v5.x.x.js | 12 +++++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/definitions/npm/react-router-dom_v6.x.x/flow_v0.201.x-/react-router-dom_v6.x.x.js b/definitions/npm/react-router-dom_v6.x.x/flow_v0.201.x-/react-router-dom_v6.x.x.js index 5594542210..6f3058c0ce 100644 --- a/definitions/npm/react-router-dom_v6.x.x/flow_v0.201.x-/react-router-dom_v6.x.x.js +++ b/definitions/npm/react-router-dom_v6.x.x/flow_v0.201.x-/react-router-dom_v6.x.x.js @@ -73,7 +73,7 @@ declare module 'react-router-dom' { */ declare export type AgnosticRouteMatch< ParamKey: string = string, - RouteObjectType: AgnosticRouteObject = AgnosticRouteObject + RouteObjectType: AgnosticRouteObject | AgnosticDataRouteObject = AgnosticRouteObject > = {| /** * The names and values of dynamic parameters in the URL. diff --git a/definitions/npm/webpack_v4.x.x/flow_v0.104.x-/webpack_v4.x.x.js b/definitions/npm/webpack_v4.x.x/flow_v0.104.x-/webpack_v4.x.x.js index 7db084ee92..d3887d8c08 100644 --- a/definitions/npm/webpack_v4.x.x/flow_v0.104.x-/webpack_v4.x.x.js +++ b/definitions/npm/webpack_v4.x.x/flow_v0.104.x-/webpack_v4.x.x.js @@ -14,7 +14,7 @@ declare module 'webpack' { hasErrors(): boolean; hasWarnings(): boolean; toJson(options?: StatsOptions): any; - toString(options?: { ...StatsOptions, colors?: boolean, ... }): string; + toString(options?: { ...StatsOptionsObject, colors?: boolean, ... }): string; } declare type Callback = (error: WebpackError, stats: Stats) => void; @@ -375,10 +375,7 @@ declare module 'webpack' { declare type FilterTypes = FilterItemTypes | Array; - declare type StatsOptions = - | boolean - | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose') - | { + declare type StatsOptionsObject = { all?: boolean, assets?: boolean, assetsSort?: string, @@ -433,6 +430,11 @@ declare module 'webpack' { ... }; + declare type StatsOptions = + | boolean + | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose') + | StatsOptionsObject; + declare type WatchOptions = { aggregateTimeout?: number, ignored?: { [k: string]: any, ... }, diff --git a/definitions/npm/webpack_v5.x.x/flow_v0.104.x-/webpack_v5.x.x.js b/definitions/npm/webpack_v5.x.x/flow_v0.104.x-/webpack_v5.x.x.js index 3ec244d5b7..1a04a33750 100644 --- a/definitions/npm/webpack_v5.x.x/flow_v0.104.x-/webpack_v5.x.x.js +++ b/definitions/npm/webpack_v5.x.x/flow_v0.104.x-/webpack_v5.x.x.js @@ -14,7 +14,7 @@ declare module 'webpack' { hasErrors(): boolean; hasWarnings(): boolean; toJson(options?: StatsOptions): any; - toString(options?: { ...StatsOptions, colors?: boolean, ... }): string; + toString(options?: { ...StatsOptionsObject, colors?: boolean, ... }): string; } declare type Callback = (error: WebpackError, stats: Stats) => void; @@ -375,10 +375,7 @@ declare module 'webpack' { declare type FilterTypes = FilterItemTypes | Array; - declare type StatsOptions = - | boolean - | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose') - | { + declare type StatsOptionsObject = { all?: boolean, assets?: boolean, assetsSort?: string, @@ -433,6 +430,11 @@ declare module 'webpack' { ... }; + declare type StatsOptions = + | boolean + | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose') + | StatsOptionsObject; + declare type WatchOptions = { aggregateTimeout?: number, ignored?: { [k: string]: any, ... },