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:
parent
c39388b2e3
commit
0643d63480
2 changed files with 12 additions and 8 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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", {});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue