Closed ghost closed 2 years ago
https://github.com/webpack/tapable/blob/a0a7b26224557bd8bb09b97e0126b7dbda9f8e6a/tapable.d.ts#L59
Maybe adding a string[]
should help here?
I'm not sure how it works internally but according to the example, it should work.
All Hook constructors take one optional argument, which is a list of argument names as strings.
- constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
+ constructor(args?: ArgumentNames<AsArray<T>> | string[], name?: string);
Actually, I think in this context (and some other context), ArgumentNames<AsArray<T>>
is not needed. Instead, use string[]
. I'll submit a PR when I have time.
Hello. First of all, I just wanted to say this is a nice library. Unfortunately sadly, it was wrongly typed.
I was testing out this library (with TS) and it produces the following error:
Code: