mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Use strict type checking
This commit is contained in:
1 parent
2ca8e69025
commit
a66e930997
36 files changed
+714
-676
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user