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 <noreply@anthropic.com>
This commit is contained in:
Facu_Viñas 2026-03-11 11:56:18 -03:00
parent c39388b2e3
commit 0643d63480
2 changed files with 12 additions and 8 deletions

View file

@ -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<void> {
const res = await this.discordApi("GET", "/users/@me");

View file

@ -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<void> {
const res = await this.slackApi("auth.test", {});