Description
Concerning TypeScript, there seems to be a mismatch between message event type definitions and the actual events from Slack. For instance the following example would cause unexpected errors due to message_changed events:
app.message(({ message }) => {
const user: string = message.user
if (user.match(/^U/)) {
// ...
}
})
The type definition does not allow message.user to be undefined, but in reality it may be when the subtype is message_changed. This issue is easy to work around by filtering by subtype, but these type safety breaking issues can be fiendishly difficult to detect.
What type of issue is this?
Requirements
Description
Concerning TypeScript, there seems to be a mismatch between message event type definitions and the actual events from Slack. For instance the following example would cause unexpected errors due to
message_changedevents:The type definition does not allow
message.userto beundefined, but in reality it may be when the subtype ismessage_changed. This issue is easy to work around by filtering by subtype, but these type safety breaking issues can be fiendishly difficult to detect.What type of issue is this?
Requirements