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.'); }