Skip to content

Commit

Permalink
Fix for reaction_ events (ref #1473)
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch authored and filmaj committed Jun 6, 2022
1 parent a5ad6f4 commit 80f78ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types/events/base-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,13 +650,15 @@ export interface ReactionMessageItem {

export interface ReactionFileItem {
type: 'file';
channel: string;
file: string;
}

// This type is deprecated.
// See https://api.slack.com/changelog/2018-05-file-threads-soon-tread
export interface ReactionFileCommentItem {
type: 'file_comment';
channel: string;
file_comment: string;
file: string;
}
Expand Down
14 changes: 14 additions & 0 deletions types-tests/event.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,17 @@ expectType<void>(
await Promise.resolve(event);
})
);

expectType<void>(
app.event('reaction_added', async ({ say, event }) => {
expectType<SayFn>(say);
await Promise.resolve(event);
})
);

expectType<void>(
app.event('reaction_removed', async ({ say, event }) => {
expectType<SayFn>(say);
await Promise.resolve(event);
})
);

0 comments on commit 80f78ea

Please sign in to comment.