- bf594cf: Fix TypeScript issues with the ponyfill (#66)
asyncIterator()now returnsReadableStreamAsyncIterator<R>instead of an internal interface that exposed a privateunique symbolbrand. The package provides a compatible global declaration for older TypeScript versions and merges with modernlib.dom.d.ts, so ponyfill and polyfill usage share the same iterator type surface.- Breaking type change: the unused
TReturngeneric parameter onasyncIterator()has been removed from the public signature. Runtimeiterator.return(value)behavior remains spec-compliant and resolves with{ done: true, value }, while the public type followslib.dom'sReadableStreamAsyncIterator<T>shape. - Added a top-level
typesfield and atypesVersionsmap mirroring every subpath inexports, so the package's type definitions can be resolved under classicmoduleResolution: "node"in addition tonode16/nodenext/bundler. - The polyfill now installs
ReadableStream.prototype.valuesandReadableStream.prototype[Symbol.asyncIterator]with Web IDL-conformant descriptors (valuesis enumerable,[Symbol.asyncIterator]is not) and guarantees the two slots reference the same function object.
- bd69b3e: Bump deps and switch to OIDC publishing
- 3b16e97: Update iterator-related types to cope with typescript 5.6 changes. See this writeup and this PR.
-
7cb5954: Refactor
asyncIteratorponyfill APIBREAKING: The
asyncIteratorfrom the ponyfill API is refactored, you should now use it like this:asyncIterator(readableStream);
instead of
asyncIterator.call(readableStream);
- 82a7030: Fix package.json main and module entry point.
-
0398fc0: Restructure codebase and export ponyfill entry points.
BREAKING CHANGE: The API is redesgined. Check REAMDE.md for details.