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

Method set

packages/firebase-database/index.ios.ts:127–140  ·  view source on GitHub ↗
(value: any, onComplete?: (error: FirebaseError) => void)

Source from the content-addressed store, hash-verified

125 }
126
127 set(value: any, onComplete?: (error: FirebaseError) => void): Promise<void> {
128 return new Promise((resolve, reject) => {
129 this.native.onDisconnectSetValueWithCompletionBlock(serializeItems(value), (error, ref) => {
130 if (error) {
131 const err = FirebaseError.fromNative(error);
132 onComplete?.(err);
133 reject(err);
134 } else {
135 onComplete?.(null);
136 resolve();
137 }
138 });
139 });
140 }
141
142 setWithPriority(value: any, priority: string | number, onComplete?: (error: FirebaseError) => void): Promise<void> {
143 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 2

serializeItemsFunction · 0.70
fromNativeMethod · 0.45

Tested by

no test coverage detected