| 72 | type OnUpdateCallback = (metadata: JSZipMetadata) => void; |
| 73 | |
| 74 | interface JSZipObject { |
| 75 | name: string; |
| 76 | /** |
| 77 | * Present for files loadded with `loadAsync`. May contain ".." path components that could |
| 78 | * result in a zip-slip attack. See https://snyk.io/research/zip-slip-vulnerability |
| 79 | */ |
| 80 | unsafeOriginalName?: string; |
| 81 | dir: boolean; |
| 82 | date: Date; |
| 83 | comment: string; |
| 84 | /** The UNIX permissions of the file, if any. */ |
| 85 | unixPermissions: number | string | null; |
| 86 | /** The UNIX permissions of the file, if any. */ |
| 87 | dosPermissions: number | null; |
| 88 | options: JSZipObjectOptions; |
| 89 | |
| 90 | /** |
| 91 | * Prepare the content in the asked type. |
| 92 | * @param type the type of the result. |
| 93 | * @param onUpdate a function to call on each internal update. |
| 94 | * @return Promise the promise of the result. |
| 95 | */ |
| 96 | async<T extends OutputType>(type: T, onUpdate?: OnUpdateCallback): Promise<OutputByType[T]>; |
| 97 | nodeStream(type?: 'nodebuffer', onUpdate?: OnUpdateCallback): NodeJS.ReadableStream; |
| 98 | } |
| 99 | |
| 100 | interface JSZipFileOptions { |
| 101 | /** Set to `true` if the data is `base64` encoded. For example image data from a `<canvas>` element. Plain text and HTML do not need this option. */ |
no outgoing calls
no test coverage detected