mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +09:00
expose and/or modify signatures from lib package
This commit is contained in:
1 parent
b72fa25d3f
commit
e011625a2d
5 files changed
+72
-11
No files matched your search
@@ -80,7 +80,7 @@ export class HostGenerateTokenRequest {
|
||||
static permission = "core.host.generate_token" as const;
|
||||
|
||||
constructor(
|
||||
public hostId?: number,
|
||||
public hostId: number | null = null,
|
||||
) { }
|
||||
|
||||
static jsonSchema = Type.Object({
|
||||
@@ -202,7 +202,7 @@ export class LogMessageEvent {
|
||||
static dst = ["controller", "control"] as const;
|
||||
|
||||
constructor(
|
||||
public info: object,
|
||||
public info: { level: string, message: string },
|
||||
) { }
|
||||
|
||||
static jsonSchema = Type.Object({
|
||||
|
||||
@@ -48,7 +48,7 @@ export class Address {
|
||||
* Shorthand to translate with.
|
||||
* @returns Translated address.
|
||||
*/
|
||||
static fromShorthand(shorthand: AddressShorthand) {
|
||||
static fromShorthand(shorthand: AddressShorthand | Address) {
|
||||
if (shorthand instanceof Address) { return shorthand; }
|
||||
if (shorthand === "controller") { return new Address(Address.controller, 0); }
|
||||
if (shorthand === "allHosts") { return new Address(Address.broadcast, Address.host); }
|
||||
@@ -172,6 +172,8 @@ export class Message {
|
||||
}
|
||||
}
|
||||
|
||||
export type MessageSrcDst = MessageRequest | MessageResponse | MessageResponseError | MessageEvent;
|
||||
|
||||
export class HelloData {
|
||||
constructor(
|
||||
public version: string,
|
||||
|
||||
Reference in new issue
Block a user