Previously, I successfully used Firebase Functions with JavaScript. However, after translating my code to TypeScript, I encountered an issue while trying to update my functions. The error message I received is as follows:
Expected at least 1 argument, but received 0 or more.
The problematic block of code is shown below:
size = array.size;
if (size === 0) {
return;
} else {
array.forEach((doc: any) => {
docRefCarsDetails.push(db.collection('cars').doc(doc.get('licensePlate')));
})
return Promise.resolve(db.runTransaction(transaction => {
return Promise.resolve(transaction.getAll(...docRefCarsDetails));
}))
}
I even attempted to check the size to prevent this error from occurring. Your assistance is greatly appreciated!