tripledoc
Version:
Library to read, create and update documents on a Solid Pod
24 lines (23 loc) • 978 B
TypeScript
/**
* This file wraps N3.js, providing just the RDF/JS interface we need.
*
* The N3.js Store does not implement the RDF/JS Dataset interface. However, Tripledoc relies on
* that interface to be able to potentially use different RDF libraries, supporting e.g. different
* serialisation formats. Thus, we wrap N3.js in this standardised interface, at least in so far we
* use it.
*/
import { Dataset as RdfjsDataset } from 'rdf-js';
/**
* Only the methods of `Dataset` we need.
*
* Everywhere this data type is expected, a full-blown RDF/JS Dataset will also be accepted.
*
* @ignore For internal use only, although it's exposed as an escape hatch through TripleDocument.getStore().
*/
export declare type Dataset = {
addAll: (...params: Parameters<RdfjsDataset['addAll']>) => Dataset;
match: (...params: Parameters<RdfjsDataset['match']>) => {
toArray: RdfjsDataset['toArray'];
};
toArray: RdfjsDataset['toArray'];
};