@@ -68,10 +68,12 @@ export class CancelablePromise<T> implements Promise<T> {
6868 #resolve?: (value: T | PromiseLike<T>) => void;
6969 #reject?: (reason?: any) => void;
7070
71-  constructor(executor: (
72-  resolve: (value: T | PromiseLike<T>) => void,
73-  reject: (reason?: any) => void,
74-  onCancel: (cancelHandler: () => void) => void) => void,
71+  constructor(
72+  executor: (
73+  resolve: (value: T | PromiseLike<T>) => void,
74+  reject: (reason?: any) => void,
75+  onCancel: (cancelHandler: () => void) => void
76+  ) => void
7577 ) {
7678 this.#isPending = true;
7779 this.#isCanceled = false;
@@ -127,7 +129,7 @@ export class CancelablePromise<T> implements Promise<T> {
127129 for (const cancelHandler of this.#cancelHandlers) {
128130 cancelHandler();
129131 }
130-  } catch  (error) {
132+  } catch(error) {
131133 this.#reject?.(error);
132134 return;
133135 }
@@ -2537,10 +2539,12 @@ export class CancelablePromise<T> implements Promise<T> {
25372539 #resolve?: (value: T | PromiseLike<T>) => void;
25382540 #reject?: (reason?: any) => void;
25392541
2540-  constructor(executor: (
2541-  resolve: (value: T | PromiseLike<T>) => void,
2542-  reject: (reason?: any) => void,
2543-  onCancel: (cancelHandler: () => void) => void) => void,
2542+  constructor(
2543+  executor: (
2544+  resolve: (value: T | PromiseLike<T>) => void,
2545+  reject: (reason?: any) => void,
2546+  onCancel: (cancelHandler: () => void) => void
2547+  ) => void
25442548 ) {
25452549 this.#isPending = true;
25462550 this.#isCanceled = false;
@@ -2596,7 +2600,7 @@ export class CancelablePromise<T> implements Promise<T> {
25962600 for (const cancelHandler of this.#cancelHandlers) {
25972601 cancelHandler();
25982602 }
2599-  } catch  (error) {
2603+  } catch(error) {
26002604 this.#reject?.(error);
26012605 return;
26022606 }
0 commit comments