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
@tjx666 I've had a lot of problems with using unknown in generic's extends clause, so I've always defaulted to any in that case. It's a generic narrowing, so it doesn't matter.
However, in this case if you change (...args: unknown[]) => unknown to (...args: any[]) => any it also doesn't work.
But if you do ((...args: any[]) => any) | (() => any), then it works.
Activity
xianshenglu commentedon Feb 23, 2021
Can we let
thisindatabe accessible to othercomputedvalues ormethods?tjx666 commentedon Dec 18, 2023
What's the problem here?
@so1ve @Andarist
Code will work if I turn
(...args: unknown[]) => unknown>toanyDCzajkowski commentedon Sep 3, 2024
@tjx666 I've had a lot of problems with using
unknownin generic'sextendsclause, so I've always defaulted toanyin that case. It's a generic narrowing, so it doesn't matter.However, in this case if you change
(...args: unknown[]) => unknownto(...args: any[]) => anyit also doesn't work.But if you do
((...args: any[]) => any) | (() => any), then it works.I don't know the reason 🤷♀️