Open dsherret opened 7 months ago
Something like this, but need to actually go through and figure out what everything is based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/stream/web.d.ts#L17 and https://github.com/denoland/deno/blob/7281775381cda79ef61df27820387dc2c74e0384/ext/web/lib.deno_web.d.ts
// in https://github.com/denoland/dnt/blob/main/lib/shims.ts function getNodeWebStreamsShim(): Shim { return { package: { name: "node:stream/web", }, globalNames: [ "ReadableStream", "WritableStream", "TextDecoderStream", typeOnly("ReadableStreamController"), typeOnly("ReadableStreamDefaultReadValueResult"), typeOnly("ReadableStreamDefaultReader"), typeOnly("WritableStreamDefaultWriter"), typeOnly("QueuingStrategy"), { name: "PipeOptions", exportName: "StreamPipeOptions", typeOnly: true, }, ], }; }
Then someone could just do: nodeWebStreams: true in their shims.
nodeWebStreams: true
See also: https://nodejs.org/api/webstreams.html#web-streams-api
Something like this, but need to actually go through and figure out what everything is based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/stream/web.d.ts#L17 and https://github.com/denoland/deno/blob/7281775381cda79ef61df27820387dc2c74e0384/ext/web/lib.deno_web.d.ts
Then someone could just do:
nodeWebStreams: true
in their shims.