diff --git a/lib/ModuleFilenameHelpers.js b/lib/ModuleFilenameHelpers.js index dd8314edf94..236c7ec8df8 100644 --- a/lib/ModuleFilenameHelpers.js +++ b/lib/ModuleFilenameHelpers.js @@ -14,7 +14,7 @@ const memoize = require("./util/memoize"); /** @typedef {import("./RequestShortener")} RequestShortener */ /** @typedef {typeof import("./util/Hash")} Hash */ -/** @typedef {string | RegExp | string[] | RegExp[]} Matcher */ +/** @typedef {string | RegExp | (string | RegExp)[]} Matcher */ /** @typedef {{test?: Matcher, include?: Matcher, exclude?: Matcher }} MatchObject */ const ModuleFilenameHelpers = exports; diff --git a/types.d.ts b/types.d.ts index 0009c9bf054..edf023557e6 100644 --- a/types.d.ts +++ b/types.d.ts @@ -6818,11 +6818,11 @@ declare interface MapOptions { module?: boolean; } declare interface MatchObject { - test?: string | RegExp | string[] | RegExp[]; - include?: string | RegExp | string[] | RegExp[]; - exclude?: string | RegExp | string[] | RegExp[]; + test?: string | RegExp | (string | RegExp)[]; + include?: string | RegExp | (string | RegExp)[]; + exclude?: string | RegExp | (string | RegExp)[]; } -type Matcher = string | RegExp | string[] | RegExp[]; +type Matcher = string | RegExp | (string | RegExp)[]; /** * Options object for in-memory caching.