Skip to content

Ideas: customer event protocol #1194

@bobzhang

Description

@bobzhang

suppose we have a data type

type data = 
| `exit of int * string 
| `fail of int * string * string 
[@@bs.deriving{event}]

We could derive such API

on_exit : (int -> string -> unit ) -> unit  [@@bs.send.pipe: emitter]
emit_exit : int -> string -> unit 
on_fail : (int -> string -> string -> unit) -> unit 
emit_fail : int -> string -> string -> unit 

We also need handle name collision too

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleOld issues that went stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions