bynk.event.outside_context
Error An event was declared outside a context.
An event is declared in a context, and only that context may emit it, so an event belongs to its owner. A commons is shared code that other units uses, with no owner to emit from, so one may not declare an event. Declare the event in the context that raises it. Other contexts subscribe by consuming that context.
Example
commons shop
event Paid = { id: String } // ✗ a commons has no owner to emit it
context shop
event Paid = { id: String } // ✓ declared where it is emittedIn the Book
See also
- Every code in its category, Events, on the diagnostic index.
bynk explain bynk.event.outside_contextshows the same from the installed toolchain, without a network.