I have an issue with my typescript compiler that i get error for this query :
const xxx = admin.firestore().collection('xxx') .where('end', '!=', timestampDate).where('end', '<', timestampDate).get();
error : Argument of type ‘”!=”‘ is not assignable to parameter of type ‘WhereFilterOp’.ts(2345).
any solution ?
Advertisement
Answer
Update your Firebase/Firestore libraries to the latest version. Not-equals queries were not available until very recently. According to the @google-cloud/firestore release notes, you need to be on version 4.3.0 or later. If you’re using the Firebase Admin SDK to get access to the same library, try the latest 9.3.0.