Skip to content

Instantly share code, notes, and snippets.

@JozefFlakus
Last active February 6, 2020 08:06
Show Gist options
  • Save JozefFlakus/437d330b65cb8d629b17f622ef526129 to your computer and use it in GitHub Desktop.
Save JozefFlakus/437d330b65cb8d629b17f622ef526129 to your computer and use it in GitHub Desktop.
Marble.js 3.0 - effect interface
interface Effect<I, O, Client> {
(input$: Observable<I>, ctx: EffectContext<Client>): Observable<O>;
}
interface HttpEffect<
I = HttpRequest,
O = HttpEffectResponse,
> extends Effect<I, O, HttpServer> {}
interface WsEffect<
T = Event,
U = Event,
> extends Effect<T, U, WebSocketClientConnection> {}
interface MsgEffect<
I = Event,
O = Event,
> extends Effect<I, O, MsgClient> {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment