Generic "BaseCommand" options #1156
Unanswered
simplenotezy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to specify some generic options and methods used by all CLI commands, example:
--silent,--verbose,--log-queriesI 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