The Graphviz engine surface jssm/viz actually consumes: one ready-to-use
object with a renderString(dot, options) method. This is the contract
for configure({ viz }) injection — a direct adapter, not a
factory: the caller instantiates (and, if needed, awaits) their engine
themselves, then hands over the finished object. renderString receives
the dot source and an options object whose members jssm/viz uses are
format (always 'svg') and engine (a Graphviz layout engine name,
when the caller of a render function supplied one); it may return the
output string synchronously (like @viz-js/viz) or as a promise (like
asm.js viz.js 2.x), and jssm/viz awaits either.
import { instance } from'@viz-js/viz'; configure({ viz:awaitinstance() }); // the default engine, injected by hand
The Graphviz engine surface jssm/viz actually consumes: one ready-to-use object with a
renderString(dot, options)method. This is the contract for configure({ viz })injection — a direct adapter, not a factory: the caller instantiates (and, if needed, awaits) their engine themselves, then hands over the finished object.renderStringreceives the dot source and an options object whose members jssm/viz uses areformat(always'svg') andengine(a Graphviz layout engine name, when the caller of a render function supplied one); it may return the output string synchronously (like@viz-js/viz) or as a promise (like asm.jsviz.js2.x), and jssm/viz awaits either.See
configure