From c52909e2d26eb95e8e7c24b98e645cb0051fd699 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Wed, 21 Aug 2024 06:37:59 +0200 Subject: [PATCH] Use as instead of angle bracket syntax for typecasting. --- src/internal/disposable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/disposable.ts b/src/internal/disposable.ts index 092f3bf..7f5e17a 100644 --- a/src/internal/disposable.ts +++ b/src/internal/disposable.ts @@ -33,7 +33,7 @@ export class Disposable { } private static checkResult(instance: TInstanceType, result: TReturnType) { - if (result === instance) { + if (result === instance as unknown) { throw new MagickError('The result of the function cannot be the instance that has been disposed.'); }