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

Export type Flags #27

Open
transitive-bullshit opened this issue Mar 31, 2024 · 1 comment · May be fixed by #28
Open

Export type Flags #27

transitive-bullshit opened this issue Mar 31, 2024 · 1 comment · May be fixed by #28

Comments

@transitive-bullshit
Copy link
Sponsor

Feature request

It makes sense to export public types for ease of access, and I find myself commonly wanting to omit/pick from a set of flags shared across multiple CLIs within a large project. I can do this with the workaround below, but it would be nicer if this module exported the Flags type directly.

Why?

It's useful to get the type of Flags without introspecting the other output types.

Alternatives

import { type Command, cli } from 'cleye'

type Flags = NonNullable<Command['options']['flags']>

Additional context

No response

@privatenumber
Copy link
Owner

Sure! PR Welcome!

@transitive-bullshit transitive-bullshit linked a pull request Mar 31, 2024 that will close this issue
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 a pull request may close this issue.

2 participants