@graphty/graphty-element / index / registerFormatWriter
Function: registerFormatWriter() ​
registerFormatWriter(
registration,options?):void
Defined in: graphty-element/src/catalog/writerRegistry.ts:145
Register a writer for a file format.
Follows the policy every registry has: a built-in id is refused with E_DUPLICATE_PLUGIN, the same exporter registered twice is a no-op, and a different exporter under a taken id replaces it with one warning, or throws with { strict: true }.
Parameters ​
registration ​
The descriptor, the exporter and the writer's options.
options? ​
Whether a collision throws instead of replacing.
Returns ​
void
Throws ​
A GraphtyError with E_BAD_COMMAND (details.field names the member at fault) or E_DUPLICATE_PLUGIN.