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
That said, I was curious if anyone had a better solution out there to ensure it was typed properly, or if maybe I was missing something. Is there a better way to do this? If not, is this an overload that could be added to ng-mocks, or, since it's specific to jest, is that not something that is done?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, when I use
MockInstance
withjest.fn
:The resulting type of this function is:
Ideally, it would actually be mocked to be:
The best way I've found to get it to be typed properly is to add this somewhere in a typescript file, probably some global
.d.ts
file:That said, I was curious if anyone had a better solution out there to ensure it was typed properly, or if maybe I was missing something. Is there a better way to do this? If not, is this an overload that could be added to
ng-mocks
, or, since it's specific to jest, is that not something that is done?Beta Was this translation helpful? Give feedback.
All reactions