Skip to content

Commit 5adef36

Browse files
NeeEoojonkoops
andauthored
Add missing types for JSZip.defaults (#927)
Signed-off-by: Jon Koops <jonkoops@gmail.com> Co-authored-by: Jon Koops <jonkoops@gmail.com>
1 parent 41a1342 commit 5adef36

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎index.d.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,19 @@ declare namespace JSZip {
170170
decodeFileName?: (bytes: string[] | Uint8Array | Buffer) => string;
171171
}
172172

173+
interface JSZipDefaults {
174+
base64: boolean;
175+
binary: boolean;
176+
dir: boolean;
177+
createFolders: boolean;
178+
date: Date | null;
179+
compression: Compression | null;
180+
compressionOptions: CompressionOptions | null;
181+
comment: string | null;
182+
unixPermissions: number | string | null;
183+
dosPermissions: number | null;
184+
}
185+
173186
type DataEventCallback<T> = (dataChunk: T, metadata: JSZipMetadata) => void
174187
type EndEventCallback = () => void
175188
type ErrorEventCallback = (error: Error) => void
@@ -319,6 +332,7 @@ interface JSZip {
319332

320333
prototype: JSZip;
321334
support: JSZipSupport;
335+
defaults: JSZip.JSZipDefaults;
322336
external: {
323337
Promise: PromiseConstructorLike;
324338
};

0 commit comments

Comments
 (0)