rdfjs / types

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

Quad and Term Problems #9

Open jaxoncreed opened 3 years ago

jaxoncreed commented 3 years ago

There seems to be a few things that deviate from the spec:

1. BaseQuad is not a Term

In the "Data Interfaces" section of the spec (https://rdf.js.org/data-model-spec/#data-interfaces) Quad is does not extend term, however, in the typings it does: https://github.com/rdfjs/types/blob/master/data-model.d.ts#L13

2. Quad equals accepts Term instead of Quad

In the "Quad Interface" section of the spec (https://rdf.js.org/data-model-spec/#quad-interface) a Quad is the parameter for equals, but in the typings, Term is the parameter (https://github.com/rdfjs/types/blob/master/data-model.d.ts#L13)

rubensworks commented 3 years ago

All of this is actually intentional, see https://github.com/rdfjs/data-model-spec/pull/165

jaxoncreed commented 3 years ago

Okay then, I guess this is more about inconsistencies in the spec then. Is there a reason the places I linked say Quad rather than Term?

rubensworks commented 3 years ago

Is there a reason the places I linked say Quad rather than Term?

Not really, just needs an update I guess. Feel free to submit a PR! :-)