deserializeCommand(serializedCmd) {
        const factory = this.commandFactories.get(serializedCmd.type);
        if (!factory) throw new Error(`Unknown command type: ${serializedCmd.type}`);
        return factory(serializedCmd.data);
    }
Deserializes a command from its serialized form.

@param {Object} serializedCmd - The serialized command object.
@returns {Command} The deserialized command object.

@description
This method takes a serialized command object and uses the registered command factories
to create a new instance of the command. It's used when recovering from snapshots.

@throws {Error} If the command type is unknown or not registered.

@example
const deserializedCmd = undoRedoManager.deserializeCommand({type: 'SomeCommand', data: {...}});