rdfjs / types

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

The DataFactory interface is missing the fromTerm and fromQuad methods #45

Open matthieubosquet opened 1 month ago

matthieubosquet commented 1 month ago

The RDF/JS spec defines two methods fromTerm and fromQuad that are missing from the interface definition in this package.

Is it intentional?

Interface definition in @rdfjs/types:

https://github.com/rdfjs/types/blob/ec006f7e646e5ed4bc257c8f51d10191e5cd1ee3/data-model.d.ts#L239-L290

Spec definition:

Screenshot 2024-09-09 at 16 59 17
matthieubosquet commented 1 month ago

See: https://github.com/rdfjs/types/pull/46

tpluscode commented 1 month ago

Is it intentional?

I do not think it's intentional. See, the types themselves were started 7 years ago, without the missing methods: https://github.com/DefinitelyTyped/DefinitelyTyped/blame/e5b56fcf1b8133cc599e9e6d7ff155c4ac7d75be/types/rdf-js/index.d.ts#L204-L266 The new methods were added 2 years later by @elf-pavlik: https://github.com/rdfjs/data-model-spec/commit/52c631dabb8333439b98275a43679a2c24d7fd58 It would appear that no one noticed until now :)

elf-pavlik commented 1 month ago

The new methods were added 2 years later by @elf-pavlik: https://github.com/rdfjs/data-model-spec/commit/52c631dabb8333439b98275a43679a2c24d7fd58

It was requested in https://github.com/rdfjs/data-model-spec/issues/137