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

Missing array in flags.type document #134

Closed
ybiquitous opened this issue Jan 9, 2020 · 6 comments · Fixed by #135
Closed

Missing array in flags.type document #134

ybiquitous opened this issue Jan 9, 2020 · 6 comments · Fixed by #135

Comments

@ybiquitous
Copy link
Contributor

Hi,

Currently, the flags.type possible values are documented as string, boolean, and number:

- `type`: Type of value. (Possible values: `string` `boolean` `number`)

Also on README:

https://github.com/sindresorhus/meow#flags

But the actual values by minimist-options include also array:

export type OptionType = 'string' | 'boolean' | 'number' | 'array';

https://github.com/vadimdemedes/minimist-options/blob/f6d24087f871d6605b6c8d0f9c2b36af18467875/index.d.ts#L3

Do these descriptions about flags.type need to include array?

@sindresorhus
Copy link
Owner

I think we should just use our own type for this instead, without array. Wanna do a PR?

@ybiquitous
Copy link
Contributor Author

Wait, do you mean array support will be dropped? I feel array is useful...

@sindresorhus
Copy link
Owner

It was never supported. I don't like array as it doesn't indicate what the array contains. I think this is a better solution: #111

@ybiquitous
Copy link
Contributor Author

Oh, the array is originated from minimist-options and an undocumented behavior, isn't it?

I have relied on minimist-options to pass multiple values, so I will need to fix...

I think this is a better solution: #111

Make sense. multiple seems better to me too. 😃

@sindresorhus
Copy link
Owner

Oh, the array is originated from minimist-options and an undocumented behavior, isn't it?

Yup. I didn't even realize it existed.

@ybiquitous
Copy link
Contributor Author

I understand, thanks. I want to address this issue to fix the meow types! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants