Skip to content

Commit 516a1be

Browse files
committed
docs: clarify compatibility of AbortSignalLike with native AbortSignal
1 parent e8cca75 commit 516a1be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Not a drop‑in polyfill. It’s intentionally smaller and simpler. Key differen
4444

4545
- Types and modules
4646
- ESM‑only package. Use import syntax; `require()` isn’t supported.
47-
- Public types are `AbortControllerLike` and `AbortSignalLike` — lightweight subsets of the standard API. Anything that accepts an `AbortSignalLike` will also accept a standard `AbortSignal`.
47+
- Public types are `AbortControllerLike` and `AbortSignalLike` — lightweight subsets of the standard API. A parameter typed `AbortSignalLike` is type‑compatible with the native `AbortSignal`; this is compile‑time only and does not guarantee identical runtime behavior or capabilities.
4848
- TypeScript flags direct construction (`new AbortSignalLite()`) as a type error, but nothing prevents it at runtime. The web standard throws here; we rely on discipline — stick to signals from the controller or the static helpers for the intended lifecycle.
4949

5050
If you need exact spec behavior (DOMException types, EventTarget, GC semantics of `any`, timer unref, etc.), use the platform’s built‑ins where available.

0 commit comments

Comments
 (0)