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
We should take the opportunity of the incoming v2 to adopt a thisless api.
This will make action handler far more easy to test without having to mock a vorpal instance.
The function would be injected with a single arguments, an object holding the args, the options, the logger and the callback.
Proposition
We should take the opportunity of the incoming v2 to adopt a
this
less api.This will make action handler far more easy to test without having to mock a vorpal instance.
The function would be injected with a single arguments, an object holding the
args
, theoptions
, the logger and the callback.Example
Original Code
V2 proposed code
alternative usage with destructuring:
The text was updated successfully, but these errors were encountered: