Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

doc

Gets a DocumentReference instance that refers to the document at the specified absolute path.

function doc(
firestore: Firestore,
path: string,
...pathSegments: string[],
): DocumentReference<DocumentData, DocumentData>;
function doc<AppModelType, DbModelType extends DocumentData>(
reference: CollectionReference<AppModelType, DbModelType>,
path?: string,
...pathSegments: string[],
): DocumentReference<AppModelType, DbModelType>;
function doc<AppModelType, DbModelType extends DocumentData>(
reference: DocumentReference<AppModelType, DbModelType>,
path: string,
...pathSegments: string[],
): DocumentReference<DocumentData, DocumentData>;
§
doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>
[src]

Gets a DocumentReference instance that refers to the document at the specified absolute path.

§Parameters

§
firestore: Firestore
[src]
  • A reference to the root Firestore instance.
§
path: string
[src]
  • A slash-separated path to a document.
§
...pathSegments: string[] optional
[src]
  • Additional path segments that will be applied relative to the first argument.

§Return Type

§

The DocumentReference instance.

§
doc<AppModelType, DbModelType extends DocumentData>(reference: CollectionReference<AppModelType, DbModelType>, path?: string, ...pathSegments: string[]): DocumentReference<AppModelType, DbModelType>
[src]

Gets a DocumentReference instance that refers to a document within reference at the specified relative path. If no path is specified, an automatically-generated unique ID will be used for the returned DocumentReference.

§Type Parameters

§
AppModelType
[src]
§
DbModelType extends DocumentData
[src]

§Parameters

§
reference: CollectionReference<AppModelType, DbModelType>
[src]
  • A reference to a collection.
§
path?: string optional
[src]
  • A slash-separated path to a document. Has to be omitted to use auto-generated IDs.
§
...pathSegments: string[] optional
[src]
  • Additional path segments that will be applied relative to the first argument.

§Return Type

§
DocumentReference<AppModelType, DbModelType>
[src]

The DocumentReference instance.

§
doc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>
[src]

Gets a DocumentReference instance that refers to a document within reference at the specified relative path.

§Type Parameters

§
AppModelType
[src]
§
DbModelType extends DocumentData
[src]

§Parameters

§
reference: DocumentReference<AppModelType, DbModelType>
[src]
  • A reference to a Firestore document.
§
path: string
[src]
  • A slash-separated path to a document.
§
...pathSegments: string[] optional
[src]
  • Additional path segments that will be applied relative to the first argument.

§Return Type

§

The DocumentReference instance.