Files
scriptc/packages
Malte UblandClaude Opus 5.5 c6db09c8e4 Relax the async-iterator protocol demand in untyped JavaScript
TS2504 demands a `[Symbol.asyncIterator]()` method that returns an async
iterator. In untyped JavaScript, whether a value is async-iterable is a
runtime fact of the value rather than a static one, exactly like the sync
demand (2488) relaxed just above. `for await` over a non-async-iterable
and `yield*` in an async generator both lower through the runtime
protocol openers, which read the method, call it, and throw the same
TypeError Node throws when it is missing, uncallable, or returns a
non-object.

Only diagnostics change, so only variants that previously held a 2504
refusal can move: the relaxed set is consulted only when JavaScript
strictness is suppressed, and 2504 is the sole code this adds. The sync
sibling 2505 stays enforced on the typed lanes, and TypeScript sources
keep 2504 because the relaxation applies to `.js`/`.mjs`/`.cjs`/`.jsx`
only.

Corpus 8423-async-iterator-protocol-shapes.js pins the seven protocol
shapes Node rejects and the two it accepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 05:34:46 -07:00
..
2026-10-27 23:02:33 -05:00
2026-10-25 11:26:13 -05:00
2026-10-25 11:26:13 -05:00
2026-10-26 13:25:42 -05:00
2026-10-25 11:26:13 -05:00
2026-10-25 11:26:13 -05:00
2026-10-25 11:26:13 -05:00