You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is a Node library issue and not an underlying OpenAI API issue
This is an issue with the Node library
Describe the bug
The web-streams-polyfill package has a TypeScript bug where it pollutes the global namespace and misdefines [Symbol.asyncIterator] as a property rather than a method:
This causes subtle typing bugs downstream. Furthermore, ReadableStream is now supported in the LTS version of Node, so the polyfill is no longer necessary:
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
The
web-streams-polyfill
package has a TypeScript bug where it pollutes the global namespace and misdefines[Symbol.asyncIterator]
as a property rather than a method:https://github.com/MattiasBuelens/web-streams-polyfill/blob/master/dist/types/ts3.6/polyfill.d.ts#L26
vs.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncIterator/@@asyncIterator
This causes subtle typing bugs downstream. Furthermore,
ReadableStream
is now supported in the LTS version of Node, so the polyfill is no longer necessary:https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
To Reproduce
Create an interface that extends both
ReadableStream
andAsyncGenerator
after importing the SDK:Code snippets
No response
OS
macOS
Node version
18
Library version
4.24.1
The text was updated successfully, but these errors were encountered: