Skip to content

Commit

Permalink
feat: Type definitions for JSZIP, defined the filed _data of JSZipObject
Browse files Browse the repository at this point in the history
  • Loading branch information
ydl committed May 9, 2019
1 parent 933929e commit 7a0bac9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.d.ts
Expand Up @@ -45,6 +45,15 @@ interface OutputByType {
nodebuffer: Buffer;
}


interface CompressedObject {
compressedSize: number;
uncompressedSize: number;
crc32: number;
compression: object;
compressedContent: string|ArrayBuffer|Uint8Array|Buffer;
}

type InputFileFormat = InputByType[keyof InputByType];

declare namespace JSZip {
Expand All @@ -62,6 +71,8 @@ declare namespace JSZip {
/** The UNIX permissions of the file, if any. */
dosPermissions: number | null;
options: JSZipObjectOptions;

_data: CompressedObject;
/**
* Prepare the content in the asked type.
* @param type the type of the result.
Expand Down

0 comments on commit 7a0bac9

Please sign in to comment.