Open
Description
Describe the bug
When using @std/async
in a NodeJS based project / with npm and TypeScript tsc
complains about node_modules/@std/async/_dist/mux_async_iterator.d.ts
Output:
test-jsr-bug> npx tsc --noEmit
node_modules/@std/async/_dist/mux_async_iterator.d.ts:34:26 - error TS2420: Class 'MuxAsyncIterator<T>' incorrectly implements interface 'AsyncIterable<T>'.
Property '[Symbol.asyncIterator]' is missing in type 'MuxAsyncIterator<T>' but required in type 'AsyncIterable<T>'.
34 */ export declare class MuxAsyncIterator<T> implements AsyncIterable<T> {
~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:38:5
38 [Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'[Symbol.asyncIterator]' is declared here.
Found 1 error in node_modules/@std/async/_dist/mux_async_iterator.d.ts:34
The symbol is declared in the .ts source, but missing in the generated .d.ts
I assume this generation happens on JSR?
Steps to Reproduce
Minimal reproduction repo with steps: https://github.com/egfx-notifications/jsr-issue-reproduction
Expected behavior
[Symbol.asyncIterator]
is present in mux_async_iterator.d.ts
and no TypeScript errors are reported
Environment
- OS: RHEL 9.5
- NodeJS version: 22.15.0
- std version: 1.0.13