Deserializes a single node from its JSON representation.
This function takes a plain JavaScript object (typically from JSON.parse)
and reconstructs the appropriate Node subclass instance. It validates
the input and provides helpful error messages for common issues.
Parameters
nodeData: Record<string,unknown>
Plain object containing node data with a 'type' field
Deserializes a single node from its JSON representation.
This function takes a plain JavaScript object (typically from JSON.parse) and reconstructs the appropriate Node subclass instance. It validates the input and provides helpful error messages for common issues.