style: 强类型大法

This commit is contained in:
手瓜一十雪 committed 2025-02-02 23:22:21 +08:00
1 parent 76501bae34
commit 70945cf2d8
191 files changed
+923 -806

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@ import path from 'node:path';
import fs from 'node:fs';
import { hostname, systemName, systemVersion } from '@/common/system';
import { NTEventWrapper } from '@/common/event';
import { GroupMember, KickedOffLineInfo, SelfInfo, SelfStatusInfo } from '@/core/types';
import { KickedOffLineInfo, SelfInfo, SelfStatusInfo } from '@/core/types';
import { NapCatConfigLoader } from '@/core/helper/config';
import os from 'node:os';
import { NodeIKernelMsgListener, NodeIKernelProfileListener } from '@/core/listeners';
@@ -58,7 +58,7 @@ export function loadQQWrapper(QQVersion: string): WrapperNodeApi {
if (!fs.existsSync(wrapperNodePath)) {
wrapperNodePath = path.join(path.dirname(process.execPath), `./resources/app/versions/${QQVersion}/wrapper.node`);
}
const nativemodule: any = { exports: {} };
const nativemodule: { exports: WrapperNodeApi } = { exports: {} as WrapperNodeApi };
process.dlopen(nativemodule, wrapperNodePath);
return nativemodule.exports;
}