get rid of the ts-ignore

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-10-27 16:56:26 +02:00
parent 3f1237147f
commit 5d602f8e29
@@ -15,7 +15,6 @@
*/
export class CancelToken {
// @ts-ignore: is actually assigned by the Promise constructor
#cancel: () => void;
#isCancelled: boolean;
#cancelPromise: Promise<void>;
@@ -26,6 +25,8 @@ export class CancelToken {
private constructor() {
this.#isCancelled = false;
this.#cancel = () => {}; // Avoids a TS warning
this.#cancelPromise = new Promise(resolve => {
this.#cancel = () => {
this.#isCancelled = true;