webpack icon indicating copy to clipboard operation
webpack copied to clipboard

Types issue with having `(RuleSetRule | "...")` instead of `RuleSetRule`

Open oriSomething opened this issue 3 years ago • 1 comments

Bug report

What is the current behavior?

Wrong type of (RuleSetRule | "...") repeated in a few places in types.d.ts

If the current behavior is a bug, please provide the steps to reproduce.

Search for (RuleSetRule | "...") in types.d.ts

What is the expected behavior?

Having just RuleSetRule

Other relevant information: webpack version: master / 5.74.0 Node.js version: Doesn't matter Operating System: Doesn't matter Additional tools: TypeScript issue

oriSomething avatar Aug 08 '22 06:08 oriSomething

Why do you think this is a mistake?

alexander-akait avatar Aug 10 '22 12:08 alexander-akait

Because nothing really written about it inside https://webpack.js.org/configuration/module/ And to be honest it's not the most intuitive API (Not saying I have a better solution). After seeing https://github.com/webpack/webpack/blob/9fcaa243573005d6fdece9a3f8d89a0e8b399613/lib/config/defaults.js#L80 I see it's actual a thing. Thanks anyway 🙏 Sorry for wasting your time

oriSomething avatar Aug 10 '22 17:08 oriSomething