From 1a2cdc8c0ef2d37ba2f3db0b1997bbb52f01e283 Mon Sep 17 00:00:00 2001 From: idranme Date: Wed, 7 Aug 2024 22:08:47 +0800 Subject: [PATCH] opt --- src/common/server/http.ts | 2 +- src/common/utils/helper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/server/http.ts b/src/common/server/http.ts index f451f52..550522f 100644 --- a/src/common/server/http.ts +++ b/src/common/server/http.ts @@ -58,7 +58,7 @@ export abstract class HttpServerBase { start(port: number) { try { this.expressAPP.get('/', (req: Request, res: Response) => { - res.send(`${this.name}已启动`) + res.send(`${this.name} 已启动`) }) this.listen(port) llonebotError.httpServerError = '' diff --git a/src/common/utils/helper.ts b/src/common/utils/helper.ts index 03f7501..275d786 100644 --- a/src/common/utils/helper.ts +++ b/src/common/utils/helper.ts @@ -41,7 +41,7 @@ export function mergeNewProperties(newObj: any, oldObj: any) { }) } -export function isNull(value: any): value is null | undefined | void { +export function isNull(value: unknown) { return value === undefined || value === null }