rdfjs / types

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

Simplify callbacks #21

Closed tpluscode closed 3 years ago

tpluscode commented 3 years ago

Prompted by Blake's message on Gitter I thought I would take a second look and apparently the current types are imperfect

By inlining the callback/iteratee functions, the correct type of dataset argument can be used.

changeset-bot[bot] commented 3 years ago

🦋 Changeset detected

Latest commit: 95f1e31fcb0b53f3ab0446c86f47992789c640ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | @rdfjs/types | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

blake-regalia commented 3 years ago

The problem seems to stem from the spec, could this have been a limitation of WebIDL? https://rdf.js.org/dataset-spec/#quadfilteriteratee-interface

tpluscode commented 3 years ago

Possibly. And apparently it got translated to TS verbatim