Skip to content

JobRef

Defined in: src/ExpoArcgisModule.ts:318

Handle for a long-running ArcGIS job (e.g. an offline-map download). Await result() to run it to completion, observe onProgress (0–100) via addListener, or cancel() it.

  • SharedObject<JobEvents>

R

addListener<EventName>(eventName, listener): EventSubscription

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:44

Adds a listener for the given event name.

EventName extends "onProgress"

EventName

JobEvents[EventName]

EventSubscription

SharedObject.addListener


cancel(): Promise<void>

Defined in: src/ExpoArcgisModule.ts:320

Promise<void>


emit<EventName>(eventName, …args): void

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:57

Synchronously calls all the listeners attached to that specific event. The event can include any number of arguments that will be passed to the listeners.

EventName extends "onProgress"

EventName

Parameters<JobEvents[EventName]>

void

SharedObject.emit


listenerCount<EventName>(eventName): number

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:61

Returns a number of listeners added to the given event.

EventName extends "onProgress"

EventName

number

SharedObject.listenerCount


release(): void

Defined in: node_modules/expo-modules-core/build/ts-declarations/SharedObject.d.ts:18

A function that detaches the JS and native objects to let the native object deallocate before the JS object gets deallocated by the JS garbage collector. Any subsequent calls to native functions of the object will throw an error as it is no longer associated with its native counterpart.

In most cases, you should never need to use this function, except some specific performance-critical cases when manual memory management makes sense and the native object is known to exclusively retain some native memory (such as binary data or image bitmap). Before calling this function, you should ensure that nothing else will use this object later on. Shared objects created by React hooks are usually automatically released in the effect’s cleanup phase, for example: useVideoPlayer() from expo-video and useImage() from expo-image.

void

SharedObject.release


removeAllListeners(eventName): void

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:52

Removes all listeners for the given event name.

"onProgress"

void

SharedObject.removeAllListeners


removeListener<EventName>(eventName, listener): void

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:48

Removes a listener for the given event name.

EventName extends "onProgress"

EventName

JobEvents[EventName]

void

SharedObject.removeListener


result(): Promise<R>

Defined in: src/ExpoArcgisModule.ts:319

Promise<R>


optional startObserving<EventName>(eventName): void

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:66

Function that is automatically invoked when the first listener for an event with the given name is added. Override it in a subclass to perform some additional setup once the event started being observed.

EventName extends "onProgress"

EventName

void

SharedObject.startObserving


optional stopObserving<EventName>(eventName): void

Defined in: node_modules/expo-modules-core/build/ts-declarations/EventEmitter.d.ts:71

Function that is automatically invoked when the last listener for an event with the given name is removed. Override it in a subclass to perform some additional cleanup once the event is no longer observed.

EventName extends "onProgress"

EventName

void

SharedObject.stopObserving