-
Couldn't load subscription status.
- Fork 416
Open
Labels
TypeScript-specificbugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documenteddocsM-T: Documentation work onlyM-T: Documentation work onlysemver:major
Milestone
Description
The message argument in app.message listeners does not provide sufficient properties in TypeScript.
Property 'user' does not exist on type 'KnownEventFromType<"message">'. Property 'user' does not exist on type 'MessageChangedEvent'.ts(2339)
A workaround is to cast the message value by (message as GenericMessageEvent).user but needless to say, this is not great.
I ran into this today also. Trying to use the official example from https://slack.dev/bolt-js/concepts
// This will match any message that contains 👋
app.message(':wave:', async ({ message, say }) => {
await say(`Hello, <@${message.user}>`);
});
and immediately getting a ts compile error. This is not a great first-time experience. Not even sure how to get it working.
Originally posted by @memark in #826 (comment)
memark, tttocklll, akadori, coryjamescrook, cjwirth and 23 more
Metadata
Metadata
Assignees
Labels
TypeScript-specificbugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documenteddocsM-T: Documentation work onlyM-T: Documentation work onlysemver:major