style: fix

This commit is contained in:
手瓜一十雪
2024-08-25 22:09:30 +08:00
parent 5519fa9c0e
commit dbbdf6d370
3 changed files with 2 additions and 7 deletions

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);