@graphty/graphty-element / extend / ImporterSourceOptions
Interface: ImporterSourceOptions<Opts> ​
Defined in: graphty-element/src/data/DataSource.ts:233
How DataSource.fromImporter runs the importer it wraps.
Type Parameters ​
Opts ​
Opts
Properties ​
importOptions? ​
readonlyoptionalimportOptions?:Partial<Opts&CommonImportOptions>
Defined in: graphty-element/src/data/DataSource.ts:239
Options handed to the importer on every load. A descriptor option the host passes is laid over them; a descriptor option the host leaves out fills its default only where these name no value. ids defaults to "string", so an id stays the text the file wrote.
statedBy? ​
readonlyoptionalstatedBy?: (snapshot,report) =>string|null
Defined in: graphty-element/src/data/DataSource.ts:250
The words in the file that stated its direction, which the element shows beside it (directednessSource.statedBy). Return null when the file stated none: the element's own data.directed setting then stands. Left out, no file states a direction: a graph-io importer applies its own default when the file is silent (CSV's is directed), and the adapter cannot tell that default from a statement, so it claims none on the file's behalf.
Parameters ​
snapshot ​
the imported graph; snapshot.directed is the direction the importer read
report ​
the importer's report
Returns ​
string | null
the words, or null