0 | module JS.Callback
 1 |
 2 | import JS.Util
 3 |
 4 | %default total
 5 |
 6 | ||| Interface for converting Idris functions to
 7 | ||| an external callback type.
 8 | |||
 9 | ||| @cb  external callback type (for instance `EventListener`
10 | ||| @fun Idris function type
11 | public export
12 | interface Callback cb fun | cb where
13 |   callback : fun -> JSIO cb
14 |