-
Notifications
You must be signed in to change notification settings - Fork 426
Write more tests for verifying the developer experience using listener types in TypeScript #858
Copy link
Copy link
Open
Labels
Milestone
Description
Description
We can have tests verifying all explicit types of listeners are available in TypeScript. For instance, for view_submission handling, the following code would be the case. I haven't checked all others yet but having TS tests like this helps us detect breaking changes and also share examples when answering questions.
import { App, Middleware, SlackViewMiddlewareArgs, ViewSubmitAction } from '@slack/bolt';
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET
});
const modalListener: Middleware<SlackViewMiddlewareArgs<ViewSubmitAction>> = async ({ ack }) => {
await ack();
};
app.view("modal", modalListener);What type of issue is this? (place an x in one of the [ ])
- bug
- enhancement (feature request)
- question
- documentation related
- example code related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Reactions are currently unavailable