File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/util-stream/src/checksum Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -107,16 +107,13 @@ export const createChecksumStream = ({
107
107
return readable ;
108
108
} ;
109
109
110
+ const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function ( ) : void { } ;
111
+
110
112
/**
111
113
* This stub exists so that the readable returned by createChecksumStream
112
114
* identifies as "ChecksumStream" in alignment with the Node.js
113
115
* implementation.
114
116
*
115
117
* @extends ReadableStream
116
118
*/
117
- export function ChecksumStream ( ) : void { }
118
-
119
- if ( typeof ReadableStream === "function" ) {
120
- ChecksumStream . prototype = Object . create ( ReadableStream . prototype ) ;
121
- ChecksumStream . prototype . constructor = ChecksumStream ;
122
- }
119
+ export class ChecksumStream extends ( ReadableStreamRef as any ) { }
You can’t perform that action at this time.
0 commit comments