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
> deno check .\main.ts
Check file:///E:/chris/Coding/deno-test/main.ts
error: TS2339 [ERROR]: Property 'from' does not exist on type '{ new (underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number | undefined; } | undefined): ReadableStream<Uint8Array>; new <R = any>(underlyingSource: UnderlyingDefaultSource<...>, strategy?: QueuingStrategy<...> | undefined): ReadableStream<...>; new <R = any>(underlyingSource?: UnderlyingSourc...'.
const rs = ReadableStream.from([
~~~~
at file:///E:/chris/Coding/deno-test/main.ts:3:27
This error does not happen if you remove the import.
This error does not happen in Deno 1.44.4. This error happens in 1.45.0 and above.
In VSCode, if I ctrl-click on ReadableStream in the code, I see that both lib.deno.web.d.ts and lib.dom.d.ts declare an interface and variable named ReadableStream, and polyfill.d.ts (from the "web-streams-polyfill" npm package, a dependency of the "openai" package) declares an interface named ReadableStream. If I comment out the import, then only the lib.deno.web.d.ts entry appears without the other two.
The variable declared by lib.dom.d.ts is missing the from method which is present in the variable declared by lib.deno.web.d.ts and there are some other inconsistencies in the new overloads. I think this problem would be fixed either by these two declarations being made consistent, or by the declaration in lib.dom.d.ts being removed entirely (as it's redundant, assuming it's the case that lib.deno.web.d.ts is always loaded).
The text was updated successfully, but these errors were encountered:
This error does not happen if you remove the import.
This error does not happen in Deno 1.44.4. This error happens in 1.45.0 and above.
In VSCode, if I ctrl-click on
ReadableStream
in the code, I see that both lib.deno.web.d.ts and lib.dom.d.ts declare an interface and variable namedReadableStream
, andpolyfill.d.ts
(from the "web-streams-polyfill" npm package, a dependency of the "openai" package) declares an interface namedReadableStream
. If I comment out the import, then only the lib.deno.web.d.ts entry appears without the other two.The variable declared by lib.dom.d.ts is missing the
from
method which is present in the variable declared by lib.deno.web.d.ts and there are some other inconsistencies in thenew
overloads. I think this problem would be fixed either by these two declarations being made consistent, or by the declaration in lib.dom.d.ts being removed entirely (as it's redundant, assuming it's the case that lib.deno.web.d.ts is always loaded).The text was updated successfully, but these errors were encountered: