Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Arguments type #378

Open
ArthurKa opened this issue Apr 22, 2021 · 0 comments
Open

Wrong Arguments type #378

ArthurKa opened this issue Apr 22, 2021 · 0 comments

Comments

@ArthurKa
Copy link
Contributor

The following example shows us an output as { _: [], foo: 99, bar: '9987930' } of type parser.Arguments.

import parser from 'yargs-parser';

const argv = parser('--foo=99 --bar=9987930', {
  string: ['bar'],
});

console.log(argv);

image

And IntelliSense helps to pick $0 property of type string.

image
image

But there is no property $0 in output result so it's undefined.

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

No branches or pull requests

1 participant