Skip to content

Commit

Permalink
add global.ReadableStream Dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
richarddavison committed Jan 3, 2024
1 parent a8dd731 commit 4b390cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/@llrt/init.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
global.ReadableStream = class ReadableStream {
constructor() {
throw new Error(
`ReadableStream is not supported via global scope. Enable this by adding this to your code:\n\timport { ReadableStream } from "stream";\n\tglobalThis.ReadableStream = ReadableStream;`
);
}
};

__bootstrap.initTasks = [];
const initTasks = __bootstrap.initTasks;
__bootstrap.addInitTask = (task: Promise<any>) => {
Expand Down

0 comments on commit 4b390cd

Please sign in to comment.