Closed chrissantamaria closed 1 year ago
Latest commit: 7ffd1cf92f22b44a82a15228f77f7abd54e84357
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Thank you for your detailed PR, but someone beat you to it 😉: https://github.com/natemoo-re/clack/pull/105
Since the former has been merged, I'm gonna go ahead and close this.
hah, funny timing - had been thinking about that for a while but never got around to making a PR 😛
👋 tiny enhancement PR - I noticed that the return type exposed to consumers of
select
is wrapped byPromptGroupAwaitedReturn
:This has two undesirable consequences:
PromptGroupAwaitedReturn
is an abstraction which consumers shouldn't worry about - functionally, they get back a bare object so the types should reflect thatPromptGroupAwaitedReturn
implicitly stripssymbol
types from keys - ideally, consumers shouldn't worry about this either and instead just get back the types representing returned valuesTo make this more clear, this PR wraps the return in a
Prettify
helper type to make the exposed type a bare object:This should be a functional noop, but let me know if you notice any undesirable consequences! This pattern is also used a fair amount in other TypeScript projects.