Skip to content

Commit

Permalink
Merge pull request #11862 from webpack/deps/tooling
Browse files Browse the repository at this point in the history
upgrade tooling for improved array types
  • Loading branch information
sokra committed Oct 28, 2020
2 parents 103a052 + 6762521 commit 0bfb4e9
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 82 deletions.
16 changes: 6 additions & 10 deletions declarations/WebpackOptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export type EntryStatic = EntryObject | EntryUnnamed;
/**
* Module(s) that are loaded upon startup.
*/
export type EntryItem = [string, ...string[]] | string;
export type EntryItem = string[] | string;
/**
* The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
*/
Expand Down Expand Up @@ -604,7 +604,7 @@ export type StatsValue =
/**
* Environment to build for. An array of environments to build for all of them when possible.
*/
export type Target = [string, ...string[]] | false | string;
export type Target = string[] | false | string;
/**
* Enter watch mode, which rebuilds on file change.
*/
Expand Down Expand Up @@ -883,7 +883,7 @@ export interface EntryDescription {
/**
* The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
*/
dependOn?: [string, ...string[]] | string;
dependOn?: string[] | string;
/**
* Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
*/
Expand Down Expand Up @@ -1076,11 +1076,7 @@ export interface ModuleOptions {
/**
* Don't parse files matching. It's matched against the full resolved request.
*/
noParse?:
| [RegExp | string | Function, ...(RegExp | string | Function)[]]
| RegExp
| string
| Function;
noParse?: (RegExp | string | Function)[] | RegExp | string | Function;
/**
* An array of rules applied for modules.
*/
Expand Down Expand Up @@ -2344,15 +2340,15 @@ export interface EntryDescriptionNormalized {
/**
* The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
*/
dependOn?: [string, ...string[]];
dependOn?: string[];
/**
* Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.
*/
filename?: Filename;
/**
* Module(s) that are loaded upon startup. The last one is exported.
*/
import?: [string, ...string[]];
import?: string[];
/**
* Options for library.
*/
Expand Down
2 changes: 1 addition & 1 deletion declarations/plugins/WatchIgnorePlugin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export interface WatchIgnorePluginOptions {
/**
* A list of RegExps or absolute paths to directories or files that should be ignored.
*/
paths: [RegExp | string, ...(RegExp | string)[]];
paths: (RegExp | string)[];
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"style-loader": "^1.1.4",
"terser": "^4.8.0",
"toml": "^3.0.0",
"tooling": "webpack/tooling#v1.8.0",
"tooling": "webpack/tooling#v1.8.1",
"ts-loader": "^8.0.2",
"typescript": "^3.9.7",
"url-loader": "^4.1.0",
Expand Down

0 comments on commit 0bfb4e9

Please sign in to comment.