Interface: ZipTask
Defined in: src/specs/Unzip.nitro.ts:106
A single zip creation operation. Each call to Unzip.zip() returns
a ZipTask instance that can be observed and cancelled independently.
Extends
HybridObject<{android:"kotlin";ios:"swift"; }>
Properties
name
readonlyname:string
Defined in: node_modules/react-native-nitro-modules/lib/typescript/HybridObject.d.ts:52
The HybridObject's name.
Inherited from
HybridObject.name
taskId
readonlytaskId:string
Defined in: src/specs/Unzip.nitro.ts:109
Unique identifier for this zip task
Methods
await()
await():
Promise<ZipResult>
Defined in: src/specs/Unzip.nitro.ts:124
Await the zip result. Resolves when zip creation completes, rejects if cancelled or an error occurs.
Returns
Promise<ZipResult>
cancel()
cancel():
void
Defined in: src/specs/Unzip.nitro.ts:118
Cancel this zip creation. Safe to call multiple times.
Returns
void
dispose()
dispose():
void
Defined in: node_modules/react-native-nitro-modules/lib/typescript/HybridObject.d.ts:94
Disposes any resources this HybridObject might hold natively,
and releases this HybridObject's NativeState.
After calling (), this object can no longer be used.
Eagerly disposing a HybridObject could be beneficial for a queue-/handler-architecture
where a bunch of Hybrid Objects are allocated, and later deallocated once a callback (e.g. a render function)
completes.
Returns
void
Note
It is NOT required to call () manually, as the JavaScript
Garbage Collector automatically disposes and releases any resources when needed.
It is purely optional to eagerly-, and manually-, call () here - use with caution!
Inherited from
HybridObject.dispose
equals()
equals(
other):boolean
Defined in: node_modules/react-native-nitro-modules/lib/typescript/HybridObject.d.ts:79
Returns whether this HybridObject is the same object as other.
While two HybridObjects might not be equal when compared with ==, they might still
hold the same underlying HybridObject, in which case equals(other)
will return true.
Parameters
| Parameter | Type |
|---|---|
other | HybridObject<{ android: "kotlin"; ios: "swift"; }> |
Returns
boolean
Example
const hybridA = SomeModule.getExistingHybridInstance()
const hybridB = SomeModule.getExistingHybridInstance()
console.log(hybridA.equals(hybridB)) // true
Inherited from
HybridObject.equals
onProgress()
onProgress(
callback):void
Defined in: src/specs/Unzip.nitro.ts:115
Register a callback to receive progress updates. Progress is throttled to ~1 update per second.
Parameters
| Parameter | Type |
|---|---|
callback | (progress) => void |
Returns
void
toString()
toString():
string
Defined in: node_modules/react-native-nitro-modules/lib/typescript/HybridObject.d.ts:64
Returns a string representation of the given HybridObject.
Unless overridden by the HybridObject, this will return the name of the object.
Returns
string
Example
const hybridA = SomeModule.getExistingHybridInstance()
console.log(hybridA.toString()) // [HybridObject HybridA]
Inherited from
HybridObject.toString