style: fix

This commit is contained in:
手瓜一十雪 committed 2024-08-25 22:09:30 +08:00
1 parent 8f465e376e
commit f3ae6fa70f
3 files changed
+2 -7

No files matched your search

-5
View File
@@ -125,11 +125,6 @@ export class NTEventChannel extends EventEmitter {
return new Promise<Awaited<ReturnType<EventType>>>(async (resolve, reject) => {
const EventFunc = this.createEventFunction<EventType>(EventName);
let complete = false;
const Timeouter = setTimeout(() => {
if (!complete) {
reject(new Error('NTEvent EventName:' + EventName + ' timeout'));
}
}, timeout);
const retData = await EventFunc!(...args);
complete = true;
resolve(retData);