You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You didnβt provide any search terms. Did you search for existing issues before filing this?
If you search for mixin constructor in:title there are lots of hits.
π Search Terms
None
π Version & Regression Information
Tested on the nightly build.
β― Playground Link
Playground Link
π» Code
π Actual behavior
This raises the following error :
π Expected behavior
No TS errors should be raised.
Additional information about the issue
Instead of asking for a single rest parameters, TS should ask the last parameters to be a rest parameters.
Also, when #59812, is fixed, it should also be possible to do more complex constructor signatures, without relying on
any[]
:Indeed, the constraints should be on the
super()
call, NOT on the mixins constructor.This would also enable to generate the constructor parameters when the mixins e.g. has a type restrictions on
klass
, e.g. :This would also enable to create mixins taking many classes as parameters, etc.
The text was updated successfully, but these errors were encountered: