types icon indicating copy to clipboard operation
types copied to clipboard

The DataFactory interface is missing the fromTerm and fromQuad methods

Open matthieubosquet opened this issue 1 year ago • 3 comments

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 avatar Sep 09 '24 16:09 matthieubosquet

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

matthieubosquet avatar Sep 09 '24 16:09 matthieubosquet

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 :)

tpluscode avatar Sep 11 '24 19:09 tpluscode

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

elf-pavlik avatar Sep 11 '24 19:09 elf-pavlik

@matthieubosquet - I think this can now be closed.

jeswr avatar Mar 07 '25 13:03 jeswr