We've just ran into an issue that we hadn't noticed yet, the firestore.DocumentReference interface is missing a generic that is present in the firebase library
This missing caused a problem in this case, where discriminator was not required by in DocumentReference:
I also noticed the same issue with DocumentSnapshot
when in firebase it returns Promise<DocumentSnapshot<T>> with T = DocumentData
/**
* Reads the document referred to by this `DocumentReference`.
*
* Note: By default, get() attempts to provide up-to-date data when possible
* by waiting for data from the server, but it may return cached data or fail
* if you are offline and the server cannot be reached. This behavior can be
* altered via the `GetOptions` parameter.
*
* @param options An object to configure the get behavior.
* @return A Promise resolved with a DocumentSnapshot containing the
* current document contents.
*/
get(options?: GetOptions): Promise<DocumentSnapshot<T>>;
I've noticed the CollectionReference is also missing the generics that are available in the SDK. I'm not sure if this was intentional or this library hasn't been updated to include them.
We've just ran into an issue that we hadn't noticed yet, the firestore.DocumentReference interface is missing a generic that is present in the firebase library
This missing caused a problem in this case, where discriminator was not required by in DocumentReference:![image](https://user-images.githubusercontent.com/36004334/89914074-c01f4780-dbf4-11ea-90d8-4fd5cbe51d1b.png)
I also noticed the same issue with DocumentSnapshot
returns
Promise<firebase.firestore.DocumentSnapshot>
when in firebase it returns
Promise<DocumentSnapshot<T>>
withT = DocumentData