-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readable Stream not being identified as iterable in CommonJS #39051
Comments
Was it fixed? |
I'm still seeing this error. Could we reopen please? |
ReadableStream is defined in the Node .d.ts file on DefinitelyTyped; it'd have to be changed there |
@RyanCavanaugh does this mean this issue should be opened again but elsewhere? The fact that copying and pasting the example found at https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#async_iteration results in a compilation error seems like a problem. |
It seems that the problem is being discussed (DefinitelyTyped/DefinitelyTyped#62651), but not much else. Related discussion: DefinitelyTyped/DefinitelyTyped#65542 (comment) |
Solution if you're using Node.js: // this
let stream: NodeJS.ReadableStream
// instead of this
let stream: ReadableStream |
How is the import? |
TypeScript Version: 4.0.0-dev.20200611
Search Terms:
Async Iterator, Symbol, Readable Stream, CommonJS
Expected behavior:
Typescript should not give any errors since Readable Streams in node supports async iterators.
Actual behavior:
Related Issues:
Code
Workaround
Output
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: