Skip to content

Commit

Permalink
refactor: fix types (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored May 17, 2023
1 parent 3e9d441 commit 445e75b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"standard-version": "^9.5.0",
"sugarss": "^4.0.1",
"typescript": "^5.0.4",
"webpack": "^5.81.0"
"webpack": "^5.83.1"
},
"keywords": [
"cssnano",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ const { minify: minifyWorker } = require("./minify");

/** @typedef {undefined | boolean | number} Parallel */

/** @typedef {string | RegExp | string[] | RegExp[]} Rule */
/** @typedef {RegExp | string} Rule */
/** @typedef {Rule[] | Rule} Rules */

/** @typedef {(warning: Warning | WarningObject | string, file: string, source?: string) => boolean} WarningsFilter */

Expand Down
4 changes: 3 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ declare namespace CssMinimizerPlugin {
InternalResult,
Parallel,
Rule,
Rules,
WarningsFilter,
BasePluginOptions,
MinimizerWorker,
Expand Down Expand Up @@ -213,7 +214,8 @@ type InternalResult = {
errors: Array<Error | ErrorObject | string>;
};
type Parallel = undefined | boolean | number;
type Rule = string | RegExp | string[] | RegExp[];
type Rule = RegExp | string;
type Rules = Rule[] | Rule;
type WarningsFilter = (
warning: Warning | WarningObject | string,
file: string,
Expand Down

0 comments on commit 445e75b

Please sign in to comment.