From deed1061b52745d95881ee7578eb3fd01434e6ce Mon Sep 17 00:00:00 2001 From: 2547techno <109011672+2547techno@users.noreply.github.com> Date: Sat, 24 May 2025 08:04:54 -0400 Subject: [PATCH] fix(plugins): TSTL static method generation (#6223) --- CHANGELOG.md | 2 +- docs/chatterino.d.ts | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 647b0f84..ed727e11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ - Dev: Mini refactor of `TwitchAccount`. (#6182) - Dev: Refactored away some `getApp` usages in `WindowManager`. (#6194) - Dev: Simplified string literals to be a re-export of Qt functions. (#6175) -- Dev: Fixed incorrect lua generation of `c2.HTTPRequest.create` for typescript plugins. (#6190) +- Dev: Fixed incorrect lua generation of static methods for typescript plugins. (#6190, #6223) - Dev: Merged top/bottom and left/right notebook layouts. (#6215) ## 2.5.3 diff --git a/docs/chatterino.d.ts b/docs/chatterino.d.ts index 95d55c6e..608f6bfa 100644 --- a/docs/chatterino.d.ts +++ b/docs/chatterino.d.ts @@ -66,8 +66,8 @@ declare namespace c2 { is_mod(): boolean; is_vip(): boolean; - static by_name(name: string): null | Channel; - static by_twitch_id(id: string): null | Channel; + static by_name(this: void, name: string): null | Channel; + static by_twitch_id(this: void, id: string): null | Channel; } enum HTTPMethod { @@ -95,10 +95,8 @@ declare namespace c2 { set_header(name: string, value: string): void; execute(): void; - } - namespace HTTPRequest { - function create(method: HTTPMethod, url: string): HTTPRequest; + static create(this: void, method: HTTPMethod, url: string): HTTPRequest; } function log(level: LogLevel, ...data: any[]): void;