(data: T)
| 729 | } |
| 730 | |
| 731 | add(data: T) { |
| 732 | return new Promise<DocumentReference<T>>((resolve, reject) => { |
| 733 | const ref = this.native.addDocumentWithDataCompletion(serializeItems(data), (error) => { |
| 734 | if (error) { |
| 735 | reject(FirebaseError.fromNative(error)); |
| 736 | } else { |
| 737 | resolve(DocumentReference.fromNative(ref)); |
| 738 | } |
| 739 | }); |
| 740 | }); |
| 741 | } |
| 742 | |
| 743 | doc(documentPath?: string) { |
| 744 | return DocumentReference.fromNative(documentPath ? this.native.documentWithPath(documentPath) : this.native.documentWithAutoID()); |
nothing calls this directly
no test coverage detected