-
Notifications
You must be signed in to change notification settings - Fork 399
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
ack(options) does not compile in TypeScript #720
Comments
Hello @foch01 - I just checked this and it seems this framework's TS type resolution in this scenario does not work well. A workaround at this time is to have a type parameter const options: Option[] = [
{
"text": {
"type": "plain_text",
"text": "foo"
},
"value": "bar"
}
];
app.options<"block_suggestion">("test", async ({ ack}) =>{
await ack({options: options})
});
app.options("test", async ({ ack}) =>{
// Argument of type '{ options: Option[]; }' is not assignable to parameter of type '(Without<BlockOptions, OptionGroups<BlockOptions>> & OptionGroups<BlockOptions> & Without<...> & OptionGroups<...> & Without<...> & OptionGroups<...>) | (Without<...> & ... 4 more ... & DialogOptions) | undefined'.
await ack({options: options})
}); Thanks a lot for reporting this issue. |
OK, thanks. It worked for me. Keep me posted on the fix for this bug 😄 |
Considering the majority of users, we can make the |
Description
Why do I have this error?
Do you have a solution to specify the right type?
I want to send options in a select menu in modal
Attachments:
The text was updated successfully, but these errors were encountered: