-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
Description
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.
riderx, seriousme and Siilwyn