Skip to content

Commit

Permalink
feat(AbortError): added type guard (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
atassis authored Sep 30, 2022
1 parent 74cf391 commit 05958d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbortError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class AbortError extends Error {
/**
* Checks whether given `error` is an `AbortError`.
*/
export function isAbortError(error: unknown): boolean {
export function isAbortError(error: unknown): error is Error {
return (
typeof error === 'object' &&
error !== null &&
Expand Down

0 comments on commit 05958d5

Please sign in to comment.