@@ -8,19 +8,28 @@ export interface Options {
88 mode : number ;
99 compress : boolean ;
1010 forceZip64Format : boolean ;
11+ forceDosTimestamp : boolean ;
12+ compressionLevel : number ;
1113}
1214
13- export interface ReadStreamOptions extends Options {
15+
16+ export interface FileOptions extends Options {
17+ fileComment : string ;
18+ }
19+
20+ export interface ReadStreamOptions extends FileOptions {
1421 size : number ;
1522}
1623
1724export interface DirectoryOptions {
1825 mtime : Date ;
1926 mode : number ;
27+ forceDosTimestamp : boolean ;
2028}
2129
2230export interface EndOptions {
2331 forceZip64Format : boolean ;
32+ comment : string ;
2433}
2534
2635export interface DosDateTime {
@@ -29,12 +38,18 @@ export interface DosDateTime {
2938}
3039
3140export class ZipFile extends EventEmitter {
32- addFile ( realPath : string , metadataPath : string , options ?: Partial < Options > ) : void ;
41+ addFile ( realPath : string , metadataPath : string , options ?: Partial < FileOptions > ) : void ;
3342 outputStream : NodeJS . ReadableStream ;
3443 addReadStream ( input : NodeJS . ReadableStream , metadataPath : string , options ?: Partial < ReadStreamOptions > ) : void ;
44+ addReadStreamLazy ( metadataPath : string , getReadStreamFunction : ( cb : ( err : any , readStream : NodeJS . ReadableStream ) => void ) => void ) : void ;
45+ addReadStreamLazy ( metadataPath : string , options : Partial < ReadStreamOptions > , getReadStreamFunction : ( cb : ( err : any , readStream : NodeJS . ReadableStream ) => void ) => void ) : void ;
3546 addBuffer ( buffer : Buffer , metadataPath : string , options ?: Partial < Options > ) : void ;
36- end ( options ?: EndOptions , finalSizeCallback ?: ( ) => void ) : void ;
47+ end ( options ?: EndOptions , calculatedTotalSizeCallback ?: ( ) => void ) : void ;
3748
3849 addEmptyDirectory ( metadataPath : string , options ?: Partial < DirectoryOptions > ) : void ;
50+
51+ /**
52+ * @deprecated since yazl 3.3.0
53+ */
3954 dateToDosDateTime ( jsDate : Date ) : DosDateTime ;
4055}
0 commit comments