File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { JSZipObject , OnUpdateCallback , JSZipStreamHelper } from 'jszip' ;
22
3+ /**
4+ * This is used to help papaparse understand our stream.
5+ * It uses these fields for feature detection, but never actually calls read()
6+ * https://github.com/mholt/PapaParse/blob/master/papaparse.js#L244
7+ */
38interface ZipStreamHelper extends JSZipStreamHelper < string > {
49 readable : boolean ;
510 read ( ) : void ;
@@ -14,6 +19,7 @@ export default function makeZipStreamHelper(
1419 zipObj as JSZipObject & {
1520 // The type could be anything except nodebuffer from https://stuk.github.io/jszip/documentation/api_zipobject/internal_stream.html
1621 // We only need it as a string though
22+ // JSZip types don't include this method for some reason
1723 internalStream ( type : 'string' ) : JSZipStreamHelper < string > ;
1824 }
1925 ) . internalStream ( 'string' ) as ZipStreamHelper ;
You can’t perform that action at this time.
0 commit comments