-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathindex.d.ts
More file actions
30 lines (30 loc) · 1.29 KB
/
index.d.ts
File metadata and controls
30 lines (30 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
declare module "react-native-zip-archive" {
enum EncryptionMethods {
STANDARD = "STANDARD",
AES_128 = "AES-128",
AES_256 = "AES-256",
}
import { NativeEventSubscription } from "react-native";
export const DEFAULT_COMPRESSION: number;
export const NO_COMPRESSION: number;
export const BEST_SPEED: number;
export const BEST_COMPRESSION: number;
export function isPasswordProtected(source: string): Promise<boolean>;
export function zip(
source: string | string[],
target: string,
compressionLevel: number = DEFAULT_COMPRESSION
): Promise<string>;
export function zipWithPassword(
source: string | string[],
target: string,
password: string,
encryptionMethod?: EncryptionMethods,
compressionLevel: number = DEFAULT_COMPRESSION
): Promise<string>;
export function unzip(source: string, target: string, charset?: string): Promise<string>;
export function unzipWithPassword(assetPath: string, target: string, password: string): Promise<string>;
export function unzipAssets(assetPath: string, target: string): Promise<string>;
export function subscribe(callback: ({ progress, filePath }: { progress: number, filePath: string }) => void): NativeEventSubscription;
export function getUncompressedSize(source: string, charset?: string): Promise<number>;
}