123456789101112131415161718192021222324252627282930313233 |
- type EventPayloadConsumer
- protected
- &(EventPayload) => Async;
- function EventHandler:
- &(EventPayloadConsumer) => EventHandler
- &(cb) => (
- { EventHandler ({Callback::[Async] (& e => e)}, cb) }
- // important: payload will be deleted after `cb` called
- );
- export function extract-string:
- &(String, &(String) => EventPayloadConsumer) => EventPayloadConsumer
- &(prop,k) => { getter-callback (prop, get-string, k) };
- export function extract-float:
- &(String, &(NormalFloat) => EventPayloadConsumer) => EventPayloadConsumer
- &(prop,k) => { getter-callback (prop, get-float, k) };
- export function extract-integer:
- &(String, &(Integer) => EventPayloadConsumer) => EventPayloadConsumer
- &(prop,k) => { getter-callback (prop, get-integer, k) };
- export function extract-bool:
- &(String, &(Bool) => EventPayloadConsumer) => EventPayloadConsumer
- &(prop,k) => { getter-callback (prop, get-bool, k) };
- export function trigger:
- &(Async) => EventPayloadConsumer
- &(action) => { |EventPayloadConsumer| &(_) => action };
|