How to access the Uint8Array update of a document update action?

Is it possible to get the Unit8Array update for the action I just performed on the doc?
Something like this:

doc.set("key", value)
const myLastUpdate: Unit8Array = doc.getLastUpdate()

No there isn’t. You can only listen to the ydoc.on('update', ..) event.