This function extracts the model's unique identifier from a snapshot
by looking up the model class using $modelType and then reading
the value of the ID property (as declared with idProp).
Parameters
snapshot: unknown
A model snapshot (must have $modelType).
Returns string|undefined
The model ID if the snapshot has an ID property, or undefined if not.
Gets the model ID from a model snapshot.
This function extracts the model's unique identifier from a snapshot by looking up the model class using
$modelTypeand then reading the value of the ID property (as declared withidProp).