From 211b85cfec75c29f4f4b7372c4203ec44e76dbd0 Mon Sep 17 00:00:00 2001 From: samchungy Date: Thu, 1 Aug 2024 13:20:33 +1000 Subject: [PATCH] Fix dom TypeScript compiler error --- src/node/types/misc.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/node/types/misc.ts b/src/node/types/misc.ts index 7fc77bdef..4e82977a2 100644 --- a/src/node/types/misc.ts +++ b/src/node/types/misc.ts @@ -122,6 +122,15 @@ export interface IFSWatcher extends EventEmitter { close(): void; } +/** + * Declare ReadableStream in case dom.d.ts is not added to the tsconfig lib causing + * ReadableStream interface is not defined. For developers with dom.d.ts added, + * the ReadableStream interface will be merged correctly. + */ +declare global { + export interface ReadableStream {} +} + export interface IFileHandle { fd: number; appendFile(data: TData, options?: IAppendFileOptions | string): Promise;