style: remove unless
This commit is contained in:
1 parent
f3ae6fa70f
commit
a9ade98315
1 file changed
-2
@@ -124,9 +124,7 @@ export class NTEventChannel extends EventEmitter {
|
|||||||
EventName = '', timeout: number = 3000, ...args: Parameters<EventType>) {
|
EventName = '', timeout: number = 3000, ...args: Parameters<EventType>) {
|
||||||
return new Promise<Awaited<ReturnType<EventType>>>(async (resolve, reject) => {
|
return new Promise<Awaited<ReturnType<EventType>>>(async (resolve, reject) => {
|
||||||
const EventFunc = this.createEventFunction<EventType>(EventName);
|
const EventFunc = this.createEventFunction<EventType>(EventName);
|
||||||
let complete = false;
|
|
||||||
const retData = await EventFunc!(...args);
|
const retData = await EventFunc!(...args);
|
||||||
complete = true;
|
|
||||||
resolve(retData);
|
resolve(retData);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user