Skip to content

Commit 8b41638

Browse files
author
mstosio
committed
Update toStringTag in CancellablePromise
1 parent ec2c712 commit 8b41638

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/templates/core/CancelablePromise.hbs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export interface OnCancel {
2121
}
2222

2323
export class CancelablePromise<T> implements Promise<T> {
24-
readonly [Symbol.toStringTag]: string;
25-
2624
#isResolved: boolean;
2725
#isRejected: boolean;
2826
#isCancelled: boolean;
@@ -85,6 +83,10 @@ export class CancelablePromise<T> implements Promise<T> {
8583
});
8684
}
8785

86+
get [Symbol.toStringTag]() {
87+
return "Cancellable Promise";
88+
}
89+
8890
public then<TResult1 = T, TResult2 = never>(
8991
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
9092
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null

0 commit comments

Comments
 (0)