We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Would the Typescript community benefit from stricter types? It saves a few headaches when your compiler can hold your hand a bit more :)
A few things I would be looking for:
Here is something I have been using:
export enum Signal { START = 0, DATA = 1, END = 2, } export type TalkbackArgs = [signal: Signal.DATA] | [signal: Signal.END] export type Talkback = (...op: TalkbackArgs) => void export type SinkArgs<E, A> = | [signal: Signal.START, talkback: Talkback] | [signal: Signal.DATA, data: A] | [signal: Signal.END, error?: E] export type Sink<E, A> = (...op: SinkArgs<E, A>) => void export type SourceArgs<E, A> = [signal: Signal.START, sink: Sink<E, A>] export type Source<E, A> = (...op: SourceArgs<E, A>) => void export type Callbag<E, A> = Source<E, A> | Sink<E, A>
The text was updated successfully, but these errors were encountered:
Quick update, created a small package for this: https://github.com/tim-smart/strict-callbag
I also added an error type to the talkback arguments, as often a sink can fail with an error (writing a file to disk can fail etc)
Sorry, something went wrong.
No branches or pull requests
Would the Typescript community benefit from stricter types?
It saves a few headaches when your compiler can hold your hand a bit more :)
A few things I would be looking for:
Here is something I have been using:
The text was updated successfully, but these errors were encountered: