clarify null / undefined / 0

remove useless type import and signature
export directly
cleanup
This commit is contained in:
Luciole committed 2023-08-14 10:54:30 +02:00
1 parent c96a13ef30
commit 3036507baa
7 files changed
+30 -42

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ export class HostGenerateTokenRequest {
static permission = "core.host.generate_token" as const;
constructor(
public hostId: number | null = null,
public hostId?: number,
) { }
static jsonSchema = Type.Object({
+1 -1
View File
@@ -48,7 +48,7 @@ export class Address {
* Shorthand to translate with.
* @returns Translated address.
*/
static fromShorthand(shorthand: AddressShorthand | Address) {
static fromShorthand(shorthand: AddressShorthand) {
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); }