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
@zenfs/core/dist/polyfills.d.ts improperly introduces [Symbol.asyncDispose] member into AsyncIterator type, breaking other code.
According to microsoft/TypeScript#59263 (comment) , [Symbol.asyncDispose] member is not part of the iterator protocol and does not belong in AsyncIterator type.
Instead, it exists on AsyncIteratorObject, renamed from BuiltinAsyncIterator in TypeScript 5.6.
This polyfill should be deleted in favor of referencing AsyncIteratorObject wherever [Symbol.asyncDispose] is needed.
main.ts:7:3 - error TS2741: Property '[Symbol.asyncDispose]' is missing in type '{ next: () => Promise<{ value: number; }>; }' but required in type 'AsyncIterator<number, any, any>'.
7 return {
~~~~~~
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.esnext.disposable.d.ts:40:5
40 [Symbol.asyncDispose](): PromiseLike<void>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'[Symbol.asyncDispose]' is declared here.
Found 1 error in main.ts:7
This error does not occur if ZenFS is not imported.
The text was updated successfully, but these errors were encountered:
This is a temporary mitigation due to a upstream incompatibility between readable-stream (using AsyncIterator) and @types/node (using NodeJS.AsyncIterator, which extends AsyncIteratorObject).
Once the upstream issue is fixed, this can be removed.
@zenfs/core/dist/polyfills.d.ts improperly introduces
[Symbol.asyncDispose]
member intoAsyncIterator
type, breaking other code.According to microsoft/TypeScript#59263 (comment) ,
[Symbol.asyncDispose]
member is not part of the iterator protocol and does not belong inAsyncIterator
type.Instead, it exists on
AsyncIteratorObject
, renamed fromBuiltinAsyncIterator
in TypeScript 5.6.This polyfill should be deleted in favor of referencing
AsyncIteratorObject
wherever[Symbol.asyncDispose]
is needed.package.json
tsconfig.json
main.ts
Command Line
Error Message
This error does not occur if ZenFS is not imported.
The text was updated successfully, but these errors were encountered: