expose and/or modify signatures from lib package

This commit is contained in:
Luciole committed 2023-08-13 16:53:03 +02:00
1 parent b72fa25d3f
commit e011625a2d
5 files changed
+72 -11

No files matched your search

+2 -2
View File
@@ -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({
+3 -1
View File
@@ -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,