Skip to content

Commit

Permalink
Use as instead of angle bracket syntax for typecasting.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Aug 21, 2024
1 parent 9abc5b2 commit c52909e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/disposable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Disposable {
}

private static checkResult<TInstanceType extends IDisposable, TReturnType>(instance: TInstanceType, result: TReturnType) {
if (result === <unknown>instance) {
if (result === instance as unknown) {
throw new MagickError('The result of the function cannot be the instance that has been disposed.');
}

Expand Down

0 comments on commit c52909e

Please sign in to comment.