A pubsub function can be triggered by any event source, so the envelope is intentionally
permissive and needs no narrowing: context is any supported context, event is any
supported event, and done is optional (present only for sync-tag-invalidate events).
IResult is the value the handler resolves to and defaults to void. Pubsub is the one
function type that may be invoked with invoke(name, payload, {sync: true}),
which returns the handler's resolved value to the caller.
A function handler for a pubsub event.
A pubsub function can be triggered by any event source, so the envelope is intentionally permissive and needs no narrowing:
contextis any supported context,eventis any supported event, anddoneis optional (present only for sync-tag-invalidate events).IResultis the value the handler resolves to and defaults tovoid. Pubsub is the one function type that may be invoked withinvoke(name, payload, {sync: true}), which returns the handler's resolved value to the caller.