Skip to content

Commit

Permalink
fix: πŸ› declare ReadableStream global type (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
samchungy authored Aug 1, 2024
1 parent 78c1995 commit 57fba2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/node/types/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>;
Expand Down

0 comments on commit 57fba2c

Please sign in to comment.