The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > / > refEqual

refEqual() function

Returns true if the provided references are equal.

Signature:

export declare function refEqual<T>(left: DocumentReference<T> | CollectionReference<T>, right: DocumentReference<T> | CollectionReference<T>): boolean;

Parameters

Parameter Type Description
left DocumentReference<T> | CollectionReference<T> A reference to compare.
right DocumentReference<T> | CollectionReference<T> A reference to compare.

Returns:

boolean

true if the references point to the same location in the same Firestore database.