webpack / tapable

Just a little module for plugins.
MIT License
3.71k stars 393 forks source link

has `hooks.hookName.taps` been not recommanded? #152

Closed TenviLi closed 2 years ago

TenviLi commented 3 years ago

When I use this property .taps with typescript, It will prompt you that the property does not exist

image

In fact, i found this usage in the webpack source code

image

tapable.d.ts:

image

alexander-akait commented 3 years ago

Feel free to fix types

Shinyaigeek commented 3 years ago

I'm facing the same issue. any progress on this issue? If you don't mind, I would like to pick this issue.

Shinyaigeek commented 3 years ago

I'm wondering whether hooks.[hookname].taps property should be public. hooks.[hookname].taps seems to be private value used only in tapable’s inner process. (refering to hooks.[hookname].taps does not exist in also tapable's README, not only in type definitions)

In code in screenshots, hooks.[hookname].taps is accessed in order to copy A Hook’s taps into B Hook. in my opinion, it is better that tapable provide method to fullfill such a requisition

How do you think about this?