Skip to content

Better stream typings#179

Merged
jacoscaz merged 5 commits into
masterfrom
better-stream-typings
Aug 2, 2025
Merged

Better stream typings#179
jacoscaz merged 5 commits into
masterfrom
better-stream-typings

Conversation

@jacoscaz
Copy link
Copy Markdown
Collaborator

@jacoscaz jacoscaz commented Aug 1, 2025

This PR introduces the StreamLike interface, which represents the common API surface that is shared by all the stream-like constructs that Quadstore must support:

  • AsyncIterator
  • RDF/JS's Stream
  • Node's Readable

This new interface is accompanied by a suite of unit tests focusing on ensuring its compatibility with the above.

With this new interface, this PR changes the following:

  • All stream-like arguments are now defined using the new StreamLike interface, improving compatibility between the RDF/JS methods and the rest of Quadstore's API.
  • The return value of the .match() method from the RDF/JS Store interface is now typed as an AsyncIterator, coherently with its actual type at run-time.

Closes #178

@jacoscaz jacoscaz force-pushed the better-stream-typings branch from 2256d12 to e749977 Compare August 1, 2025 09:22
…Node's own (and untyped) Readable class, slight refactor for enabling tests conditionally across different test suites
@jacoscaz jacoscaz merged commit 627ff7b into master Aug 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type Incompatibility: store.match() stream not assignable to store.delStream()/putStream()

1 participant