mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
clarify null / undefined / 0
remove useless type import and signature export directly cleanup
This commit is contained in:
1 parent
c96a13ef30
commit
3036507baa
7 files changed
+30
-42
No files matched your search
@@ -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({
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in new issue
Block a user