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 = ({
107107 return readable ;
108108} ;
109109
110+ const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function ( ) : void { } ;
111+
110112/**
111113 * This stub exists so that the readable returned by createChecksumStream
112114 * identifies as "ChecksumStream" in alignment with the Node.js
113115 * implementation.
114116 *
115117 * @extends ReadableStream
116118 */
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