Skip to content

@graphty/graphty-element / index / FormatWriterRegistration

Interface: FormatWriterRegistration ​

Defined in: graphty-element/src/catalog/writerRegistry.ts:24

What registerFormatWriter accepts.

Properties ​

descriptor ​

readonly descriptor: FormatDescriptor

Defined in: graphty-element/src/catalog/writerRegistry.ts:29

The format's catalogue entry, with canExport: true. When a reader for the same id is registered, the two must agree on plainName, extensions and mimeTypes.


exporter ​

readonly exporter: GraphExporter<Record<string, unknown> & CommonExportOptions>

Defined in: graphty-element/src/catalog/writerRegistry.ts:38

The graph-io exporter that does the writing. Its format must equal descriptor.id.


writerOptions? ​

readonly optional writerOptions?: readonly OptionDescriptor[]

Defined in: graphty-element/src/catalog/writerRegistry.ts:35

The options the writer accepts beside the common ones (graph-io's sanitizeIds and onMixedDirection, and the element's notes). An export naming any other option is refused with E_UNKNOWN_OPTION.