Extracting values from a `Schema.Literal` for `Options.choice()` in @effect/cli

Is there a way to get an array of values from a Schema.Literal?
I'm specifically trying to use a literal's possible values to populate @effect/cli's Options.choice(). Something like this:
const fooLiteral = Schema.Literal('a', 'b', 'c')
const choices = literalToArray(fooLiteral) // <- literalToArray() converts Schema.Literal to Array of values.
const foo = Options.choice('foo', choices)
Was this page helpful?