From 0643d6348039ad2db42d8c7f2878cd649588a6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Facu=5FVi=C3=B1as?= Date: Wed, 11 Mar 2026 11:56:18 -0300 Subject: [PATCH] fix: desugar TypeScript parameter properties for strip-types compat Node's --experimental-strip-types doesn't support parameter properties (private readonly in constructor params). Convert to explicit field declarations + constructor assignments. Co-Authored-By: Claude Opus 4.6 --- .../extensions/remote-questions/discord-adapter.ts | 10 ++++++---- .../extensions/remote-questions/slack-adapter.ts | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/resources/extensions/remote-questions/discord-adapter.ts b/src/resources/extensions/remote-questions/discord-adapter.ts index df54ef6bd..97e145a00 100644 --- a/src/resources/extensions/remote-questions/discord-adapter.ts +++ b/src/resources/extensions/remote-questions/discord-adapter.ts @@ -20,11 +20,13 @@ const DISCORD_API = "https://discord.com/api/v10"; export class DiscordAdapter implements ChannelAdapter { readonly name = "discord"; private botUserId: string | null = null; + private readonly token: string; + private readonly channelId: string; - constructor( - private readonly token: string, - private readonly channelId: string, - ) {} + constructor(token: string, channelId: string) { + this.token = token; + this.channelId = channelId; + } async validate(): Promise { const res = await this.discordApi("GET", "/users/@me"); diff --git a/src/resources/extensions/remote-questions/slack-adapter.ts b/src/resources/extensions/remote-questions/slack-adapter.ts index 8b48b328e..1f3beff17 100644 --- a/src/resources/extensions/remote-questions/slack-adapter.ts +++ b/src/resources/extensions/remote-questions/slack-adapter.ts @@ -20,11 +20,13 @@ const SLACK_API = "https://slack.com/api"; export class SlackAdapter implements ChannelAdapter { readonly name = "slack"; private botUserId: string | null = null; + private readonly token: string; + private readonly channelId: string; - constructor( - private readonly token: string, - private readonly channelId: string, - ) {} + constructor(token: string, channelId: string) { + this.token = token; + this.channelId = channelId; + } async validate(): Promise { const res = await this.slackApi("auth.test", {});