MetadataListener / TypeListener - Getting more `change` info

Using MetadataListener or TypeListener, I’m hoping to get more information from the list of changes, but I’m finding that change.updated is a very simple object:

{
  "type":"TypeUpdate",
  "new":{
    "type":"Type",
    "module":"-type-Inventory",
    "name":"Inventory"
  },
  "old":{
    "type":"Type",
    "module":"-type-Inventory",
    "name":"Inventory"
  }
}

For example, I’d like to check the old type documentation against the new documentation. My approach was to check old.annotationValue('doc', 'details') against new.annotationValue('doc', 'details'), but these both return the same string (the documentation from the old type), presumably because the annotationValue call is only checking against what’s persisted.

Is there a different approach I should try? I wasn’t able to find a way to include more fields with the old and new objects, but perhaps that’s a feature request ticket I should open?

The whole old and new types are there in the call so your approach should work. (We use this mechanism for detecting changes to scripts for example.) If you are getting the same type twice (in memory, not serialized), that’s a bug.