Skip to content

Commit

Permalink
remove no longer needed @ts-expect-error comments
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Jan 29, 2024
1 parent ee56483 commit bc9b816
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/abortsignal-timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,16 @@ declare global {

/*#__PURE__*/
export function isSupported(): boolean {
return (
'abort' in AbortSignal &&
// @ts-expect-error `.timeout`
typeof AbortSignal.timeout === 'function'
)
return 'abort' in AbortSignal && typeof AbortSignal.timeout === 'function'
}

/*#__PURE__*/
export function isPolyfilled(): boolean {
// @ts-expect-error `.timeout`
return AbortSignal.timeout === abortSignalTimeout
}

export function apply(): void {
if (!isSupported()) {
// @ts-expect-error `.timeout`
AbortSignal.timeout = abortSignalTimeout
}
}

0 comments on commit bc9b816

Please sign in to comment.