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

feature request: return output from action handler #668

Open
scarf005 opened this issue Jan 10, 2024 · 0 comments
Open

feature request: return output from action handler #668

scarf005 opened this issue Jan 10, 2024 · 0 comments

Comments

@scarf005
Copy link
Contributor

import { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.3/command/mod.ts"

const { output } = await new Command().action(() => 1).parse()
console.log(output) // 1

afaik there's no way to retrieve return value from function passed to Command.action. being able to retrieve (and possibly typecheck its return type) would be useful.

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

No branches or pull requests

1 participant