Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Simplify type params of KurtStream (and refactor surrounding to match) #8

Merged
merged 1 commit into from
May 6, 2024

Conversation

jemc
Copy link
Collaborator

@jemc jemc commented May 6, 2024

Prior to this commit, the type argument of KurtStream needed to be the inner schema (i.e. something that extends KurtSchemaMaybe) and from this we derived what the result data type would be.

However, that was overly complicated, and nothing about the inner schema was actually being used within the class - only the derived result data type.

So, to simplify things, KurtStream's type argument is now the actual result data type itself, rather than the schema. This makes it easier for callers who want to use the KurtStream or KurtStreamEvent or KurtResult data types, as each of these now can take an easier-to-obtain type argument.

BREAKING CHANGE: Type argument of KurtStream has changed its meaning

…g to match)

Prior to this commit, the type argument of KurtStream needed to be the
inner schema (i.e. something that `extends KurtSchemaMaybe`) and from this
we derived what the result data type would be.

However, that was overly complicated, and nothing about the inner schema
was actually being used within the class - only the derived result data type.

So, to simplify things, KurtStream's type argument is now the actual
result data type itself, rather than the schema. This makes it easier
for callers who want to use the KurtStream or KurtStreamEvent or KurtResult
data types, as each of these now can take an easier-to-obtain type argument.

BREAKING CHANGE: Type argument of KurtStream has changed its meaning
@jemc jemc requested review from andreszorro and InfraK May 6, 2024 20:50
@jemc jemc self-assigned this May 6, 2024
@jemc jemc merged commit 11b9ff0 into main May 6, 2024
1 check passed
@jemc jemc deleted the refactor/stream-type-args branch May 6, 2024 21:10
@jemc jemc restored the refactor/stream-type-args branch May 6, 2024 21:10
@jemc jemc deleted the refactor/stream-type-args branch May 6, 2024 21:10
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.

2 participants