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
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
-
I'd like to specify some generic options and methods used by all CLI commands, example:
--silent
,--verbose
,--log-queries
I could create an abstract BaseCommand class that all other classes would extend, and this BaseCommand could also have options like:
However this make the abstract class more difficult to test, and in general I find using abstracted classes in Typescript is not really recommended.
Is there another approach I could take to have all commands share some common options?
Beta Was this translation helpful? Give feedback.
All reactions