cleye icon indicating copy to clipboard operation
cleye copied to clipboard

Export type Flags

Open transitive-bullshit opened this issue 10 months ago • 1 comments

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

transitive-bullshit avatar Mar 31 '24 02:03 transitive-bullshit

Sure! PR Welcome!

privatenumber avatar Mar 31 '24 04:03 privatenumber