| 188 | type ErrorEventCallback = (error: Error) => void |
| 189 | |
| 190 | interface JSZipStreamHelper<T> { |
| 191 | /** |
| 192 | * Register a listener on an event |
| 193 | */ |
| 194 | on(event: 'data', callback: DataEventCallback<T>): this; |
| 195 | on(event: 'end', callback: EndEventCallback): this; |
| 196 | on(event: 'error', callback: ErrorEventCallback): this; |
| 197 | |
| 198 | /** |
| 199 | * Read the whole stream and call a callback with the complete content |
| 200 | * |
| 201 | * @param updateCallback The function called every time the stream updates |
| 202 | * @return A Promise of the full content |
| 203 | */ |
| 204 | accumulate(updateCallback?: (metadata: JSZipMetadata) => void): Promise<T>; |
| 205 | |
| 206 | /** |
| 207 | * Resume the stream if the stream is paused. Once resumed, the stream starts sending data events again |
| 208 | * |
| 209 | * @return The current StreamHelper object, for chaining |
| 210 | */ |
| 211 | resume(): this; |
| 212 | |
| 213 | /** |
| 214 | * Pause the stream if the stream is running. Once paused, the stream stops sending data events |
| 215 | * |
| 216 | * @return The current StreamHelper object, for chaining |
| 217 | */ |
| 218 | pause(): this; |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | interface JSZip { |
no outgoing calls
no test coverage detected