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
This rule would require access to TypeScript types, so unsure if this fits into the scope of the plugin.
Basically my request is a rule called something like prefer-vi-mocked, that prefers usage of vi.mocked(thing) over (thing as Mock). The vi.mocked utility retains type information of the underlying mocked object, allowing proper type checking on function arguments and return types. Casting instead to Mock loses that information, and prevents type safety when mocking implementation or return value.
The text was updated successfully, but these errors were encountered:
This rule would require access to TypeScript types, so unsure if this fits into the scope of the plugin.
Basically my request is a rule called something like
prefer-vi-mocked
, that prefers usage ofvi.mocked(thing)
over(thing as Mock)
. Thevi.mocked
utility retains type information of the underlying mocked object, allowing proper type checking on function arguments and return types. Casting instead toMock
loses that information, and prevents type safety when mocking implementation or return value.The text was updated successfully, but these errors were encountered: