Add a basic .d.ts file for TypescriptToLua

This commit is contained in:
Mm2PL 2023-02-28 22:33:06 +01:00
parent 92ef5e35a7
commit 76065683ef
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

19
docs/chatterino.d.ts vendored Normal file
View file

@ -0,0 +1,19 @@
/** @noSelfInFile */
declare module c2 {
enum LogLevel {
Debug,
Info,
Warning,
Critical
}
class CommandContext {
words: String[];
channel_name: String;
}
function log(level: LogLevel, ...data: any[]): void;
function register_command(name: String, handler: (ctx: CommandContext)=>void): boolean;
function send_msg(channel: String, text: String): boolean;
function system_msg(channel: String, text: String): boolean;
}