diff --git a/src/AbortError.ts b/src/AbortError.ts index f41949f..22178ac 100644 --- a/src/AbortError.ts +++ b/src/AbortError.ts @@ -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 &&