Skip to content

Conversation

shadowspawn
Copy link
Member

The documentation says the client can optionally supply options, and can optionally supply opt.width. The implementation supports this, but the typings did not. This is a minor change to match the intended and implemented client interface.

Fixes: #132

Side note: the type definition files are not being fully published currently. This PR improves the types but does not change what is published. One thing at a time.

@bcoe
Copy link
Member

bcoe commented May 13, 2025

Likewise, shall we land this now that I'm marginally more active again?

@shadowspawn
Copy link
Member Author

I'll resolve conflicts hopefully in next few days or so.

@shadowspawn shadowspawn force-pushed the feature/optional-width branch from a60c448 to c46699d Compare June 8, 2025 00:51
@shadowspawn
Copy link
Member Author

shadowspawn commented Jun 8, 2025

The types are no longer being (accidentally) exported with the CJS implementation gone, so this is now a purely internal change.

After some consideration and investigation, I made it way simpler than original version of PR! Just update types to match that the calling code may be passing in undefined rather than an empty opts.

@shadowspawn shadowspawn changed the title fix: make options and opt.width optional for client and match implementation fix: make internal options and opt.width optional and match implementation Jun 8, 2025
@bcoe bcoe merged commit 4a71532 into yargs:master Jul 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Width option type differs from documentation
2 participants