Skip to content

Commit c4b67a6

Browse files
committed
Fix typing
1 parent 0757a59 commit c4b67a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

integrations/slack/src/slack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export async function slackAPI<Result>(
247247
throw new Error(`${response.status} ${response.statusText}`);
248248
}
249249

250-
const result = await response.json<SlackResponse<Result>>();
250+
const result = (await response.json()) as SlackResponse<Result>;
251251

252252
if (!result.ok) {
253253
if (retriesLeft > 0) {

integrations/slack/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ export async function getInstallationConfig(context: SlackRuntimeContext, extern
7676

7777
export async function parseEventPayload(req: Request) {
7878
// Clone the request so its body is still available to the fallback
79-
const event = await req.clone().json<{
79+
const event = (await req.clone().json()) as {
8080
event?: { type: string; [key: string]: any };
8181
type?: string;
8282
bot_id?: string;
8383
is_ext_shared_channel?: boolean;
84-
}>(); // TODO: untyping this for now
84+
};
8585

8686
return event;
8787
}

0 commit comments

Comments
 (0)