Use strict type checking

This commit is contained in:
Hornwitser committed 2023-08-12 02:31:17 +02:00
1 parent 2ca8e69025
commit a66e930997
36 files changed
+714 -676

No files matched your search

-29
View File
@@ -14,32 +14,3 @@ export * from "./messages_instance";
export * from "./messages_mod";
export * from "./messages_user";
export * from "./version";
// TODO: Remove/migrate after lib/data is migrated to ts
import type { User } from "../users";
export interface Serialisable {
jsonSchema: object,
fromJSON(json: any): object,
}
import { AddressType } from "./messages_core";
export class Request {
static type: "request";
static src: AddressType | AddressType[];
static dst: AddressType | AddressType[];
static permission: null | "string" | ((user: User, message: Request) => void);
static plugin?: string;
static jsonSchema?: object;
static fromJSON?: (json: any) => Request;
static Response?: Serialisable;
}
export class Event {
static type: "event";
static src: AddressType | AddressType[];
static dst: AddressType | AddressType[];
static permission: null | "string" | ((user: User, message: Event) => void);
static plugin?: string;
static jsonSchema?: object;
static fromJSON?: (json: any) => Event;
}