MCPcopy Create free account
hub / github.com/NativeScript/firebase / setWithPriority

Method setWithPriority

packages/firebase-database/index.ios.ts:465–478  ·  view source on GitHub ↗
(newVal: any, newPriority: string | number, onComplete?: (error: FirebaseError) => void)

Source from the content-addressed store, hash-verified

463 }
464
465 setWithPriority(newVal: any, newPriority: string | number, onComplete?: (error: FirebaseError) => void): Promise<void> {
466 return new Promise((resolve, reject) => {
467 this.native.setValueAndPriorityWithCompletionBlock(serializeItems(newVal), newPriority, (error, ref) => {
468 if (error) {
469 const err = FirebaseError.fromNative(error);
470 onComplete?.(err);
471 reject(err);
472 } else {
473 onComplete?.(null);
474 resolve();
475 }
476 });
477 });
478 }
479
480 transaction(transactionUpdate: (currentData: object) => object, onComplete?: (error: FirebaseError, committed: boolean, finalResult: any) => void, applyLocally?: boolean): Promise<any> {
481 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 2

serializeItemsFunction · 0.70
fromNativeMethod · 0.45

Tested by

no test coverage detected