I have the following basic snippet of code and my aim is to get the fullDocument property from the obj: ChangeEvent however I am not able to access this property (Property 'fullDocument' does not exist on type 'ChangeEvent<any>'). The only properties I can access are _id, clusterTime and operationType. Is there something I am missing or should I just query the fullDocument non-directly (obj['fullDocument'])?
obj: ChangeEvent
Property 'fullDocument' does not exist on type 'ChangeEvent<any>'
obj['fullDocument']
const changeStream = this.model.watch([], { fullDocument: 'updateLookup' }) .on('change', obj => { console.log(obj.fullDocument); });
1.4m articles
1.4m replys
5 comments
57.0k users