File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ export {
39
39
40
40
export { FieldPath } from './src/api/field_path' ;
41
41
42
+ // TOOD(firestorelite): Add tests when Queries are usable
43
+ export { documentId } from './src/api/field_path' ;
44
+
42
45
export { DocumentSnapshot , QueryDocumentSnapshot } from './src/api/snapshot' ;
43
46
44
47
export function registerFirestore ( ) : void {
Original file line number Diff line number Diff line change 18
18
import * as firestore from '../../index' ;
19
19
20
20
import { tryCast } from './util' ;
21
- import { FieldPath as InternalFieldPath } from '../../../src/model/path' ;
21
+ import {
22
+ DOCUMENT_KEY_NAME ,
23
+ FieldPath as InternalFieldPath
24
+ } from '../../../src/model/path' ;
22
25
import { validateNamedArrayAtLeastNumberOfElements } from '../../../src/util/input_validation' ;
23
26
import { Code , FirestoreError } from '../../../src/util/error' ;
24
27
@@ -69,3 +72,7 @@ export class FieldPath implements firestore.FieldPath {
69
72
return this . _internalPath . isEqual ( path . _internalPath ) ;
70
73
}
71
74
}
75
+
76
+ export function documentId ( ) : firestore . FieldPath {
77
+ return new FieldPath ( DOCUMENT_KEY_NAME ) ;
78
+ }
You can’t perform that action at this time.
0 commit comments