rdfjs / types

Authoritative TypeScript typings for all RDFJS specifications
MIT License
17 stars 13 forks source link

Update DatasetCoreFactory to match Dataset Factory #11

Open jaxoncreed opened 3 years ago

jaxoncreed commented 3 years ago

DatasetFactory accepts both a DataSet and an array of Quads, while DatasetCoreFactory only has an array of Quads. Note that this is correct according to the spec (https://rdf.js.org/dataset-spec/#datasetcorefactory-interface), but I would argue that consistency is better.

tpluscode commented 3 years ago

I'm not sure. I think we should try to be true to the spec. I see that Dataset#addAll indeed accepts an array as well as another dataset instance so we might align the two first.

On the other hand changing the constructor could be a potential breaking change for implementations which strictly accept only arrays