voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
18 lines (10 loc) • 541 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [documentId](./firestore_.documentid.md)
## documentId() function
Returns a special sentinel `FieldPath` to refer to the ID of a document. It can be used in queries to sort or filter by the document ID.
<b>Signature:</b>
```typescript
export declare function documentId(): FieldPath;
```
<b>Returns:</b>
[FieldPath](./firestore_.fieldpath.md)