Skip to content

Commit

Permalink
[webpack] Fix 0.208.x errors (#4456)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brianzchen committed Jun 13, 2023
1 parent 56c47e4 commit c775422
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 7 additions & 5 deletions definitions/npm/webpack_v4.x.x/flow_v0.104.x-/webpack_v4.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -375,10 +375,7 @@ declare module 'webpack' {

declare type FilterTypes = FilterItemTypes | Array<FilterItemTypes>;

declare type StatsOptions =
| boolean
| ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')
| {
declare type StatsOptionsObject = {
all?: boolean,
assets?: boolean,
assetsSort?: string,
Expand Down Expand Up @@ -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, ... },
Expand Down
12 changes: 7 additions & 5 deletions definitions/npm/webpack_v5.x.x/flow_v0.104.x-/webpack_v5.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -375,10 +375,7 @@ declare module 'webpack' {

declare type FilterTypes = FilterItemTypes | Array<FilterItemTypes>;

declare type StatsOptions =
| boolean
| ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')
| {
declare type StatsOptionsObject = {
all?: boolean,
assets?: boolean,
assetsSort?: string,
Expand Down Expand Up @@ -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, ... },
Expand Down

0 comments on commit c775422

Please sign in to comment.