make yargs' simple types available to community
See original GitHub issueProblem
If yargs ships its types, which a significantly simpler (by design) from those defined in @types/yargs
, it will break the existing TypeScript user-base.
Some users would like access to yargs’ types.
Question
Is there a way we can provide yargs’ types to the community, such that they’re as easy to install as @types/yargs
, and can be used as an alternative?
Refs: https://github.com/yargs/yargs/issues/1749, https://github.com/yargs/yargs/issues/1586
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
yargs/examples.md at main - GitHub
With yargs, the options be just a hash! · But don't walk the plank just yet! · And booleans, both long, short, and...
Read more >Building a CLI with Yargs - DEV Community
Yargs is a great library to build command line apps, simply put, it will make the process of creating an application that runs...
Read more >Yargs Interactive: Create CLI tools for humans and non-humans
Yargs Interactive is a library that provides interactive, non-interactive and mixed-mode for CLI tools. It helps you to develop a CLI that ...
Read more >Additional documentation - yargs - JS.ORG
The script name or node command is available at argv. ... extensions : The types of files to look for when requiring command...
Read more >yargs - npm
yargs the modern, pirate-themed, successor to optimist.. Latest version: 17.6.2, last published: 2 months ago. Start using yargs in your ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I personally believe this is what semver is designed for.
Ultimately, you are going to break something by doing this. People who didn’t import @types/yargs previously could have incorrectly typed code that now doesn’t compile. And if you are eventually going to make a breaking change, might as well break now.
@dalcde the “perfect world” generics defined in
@types/yargs
are much more complex than the types in the library itself.It would be a huge amount of work to make them match. We started down this path, but it honestly also makes the codebase very hard to read and update – as generics are ugly.