// @ts-ignore
if (bulkOp.length >= batchSize) {
const res = await bulkOp.execute();
...
this is my code, which works. However without the // @ts-ignore
, TypeScript generates an error:
Property ‘length’ does not exist on type ‘UnorderedBulkOperation’.
So it ‘thinks’ it doesn’t exist, but in fact it does.