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

Example of extracting handler argument types? #222

Open
everett1992 opened this issue Dec 11, 2024 · 0 comments
Open

Example of extracting handler argument types? #222

everett1992 opened this issue Dec 11, 2024 · 0 comments

Comments

@everett1992
Copy link

All the documentation and examples use an inline handler

command({
   args: {
     foo: ...
   },
   handler({foo}) {},
})

but I want to define the function separately because it's

command({
   args: {
     foo: ...
   },
   handler,
})

function handler(args: unknown) {
}

But it doesn't seem possible to get the type for args.

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