Skip to content

Commit bdf134c

Browse files
committed
fix: require markdown_text in chat.appendStream method
1 parent 06cb0af commit bdf134c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

packages/web-api/src/types/request/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export interface Unfurls {
154154
unfurl_media?: boolean;
155155
}
156156

157-
export interface ChatAppendStreamArguments extends TokenOverridable, ChannelAndTS, Partial<MarkdownText> {}
157+
export interface ChatAppendStreamArguments extends TokenOverridable, ChannelAndTS, MarkdownText {}
158158

159159
// https://docs.slack.dev/reference/methods/chat.delete
160160
export interface ChatDeleteArguments extends ChannelAndTS, AsUser, TokenOverridable {}

packages/web-api/test/types/methods/chat.test-d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ expectError(web.chat.appendStream()); // lacking argument
1010
expectError(web.chat.appendStream({})); // empty argument
1111
expectError(
1212
web.chat.appendStream({
13-
channel: 'C1234', // missing ts
13+
channel: 'C1234', // missing ts and markdown_text
1414
}),
1515
);
1616
expectError(
1717
web.chat.appendStream({
18-
ts: '1234.56', // missing channel
18+
ts: '1234.56', // missing channel and markdown_text
1919
}),
2020
);
21-
// -- happy path
22-
expectAssignable<Parameters<typeof web.chat.appendStream>>([
23-
{
24-
channel: 'C1234',
21+
expectError(
22+
web.chat.appendStream({
23+
channel: 'C1234', // missing_markdown_text
2524
ts: '1234.56',
26-
},
27-
]);
25+
}),
26+
);
27+
// -- happy path
2828
expectAssignable<Parameters<typeof web.chat.appendStream>>([
2929
{
3030
channel: 'C1234',

0 commit comments

Comments
 (0)