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

collection

Gets a CollectionReference instance that refers to the collection at the specified absolute path.

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

Gets a CollectionReference instance that refers to the collection 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 collection.
§
...pathSegments: string[] optional
[src]
  • Additional path segments to apply relative to the first argument.

§Return Type

§

The CollectionReference instance.

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

Gets a CollectionReference instance that refers to a subcollection of reference at the the specified relative path.

§Type Parameters

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

§Parameters

§
reference: CollectionReference<AppModelType, DbModelType>
[src]
  • A reference to a collection.
§
path: string
[src]
  • A slash-separated path to a collection.
§
...pathSegments: string[] optional
[src]
  • Additional path segments to apply relative to the first argument.

§Return Type

§

The CollectionReference instance.

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

Gets a CollectionReference instance that refers to a subcollection of reference at the 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 collection.
§
...pathSegments: string[] optional
[src]
  • Additional path segments that will be applied relative to the first argument.

§Return Type

§

The CollectionReference instance.