Formatting

This commit is contained in:
2026-08-10 02:04:51 +00:00
parent 26602dc156
commit f06ac63d0d
4 changed files with 15 additions and 16 deletions
+5 -1
View File
@@ -187,7 +187,11 @@ export class EventEmitter<T extends EventMap> {
* @param timeoutMs - The timeout in milliseconds.
* @returns The event payload.
*/
async waitFor<K extends keyof T>(type: K, predicate: (payload: DeeplyReadonly<T[K]>) => boolean, timeoutMs?: number): Promise<DeeplyReadonly<T[K]>> {
async waitFor<K extends keyof T>(
type: K,
predicate: (payload: DeeplyReadonly<T[K]>) => boolean,
timeoutMs?: number,
): Promise<DeeplyReadonly<T[K]>> {
// Create a promise to wait for the event to be emitted.
return new Promise((resolve, reject) => {
let timeoutId: ReturnType<typeof setTimeout> | undefined;