* Sends an event to the running Actor to trigger a transition. * * @param event The event to send
(event: EventFromLogic<TLogic>)
| 747 | * @param event The event to send |
| 748 | */ |
| 749 | public send(event: EventFromLogic<TLogic>) { |
| 750 | if (isDevelopment && typeof event === 'string') { |
| 751 | throw new Error( |
| 752 | `Only event objects may be sent to actors; use .send({ type: "${event}" }) instead` |
| 753 | ); |
| 754 | } |
| 755 | this.system._relay(undefined, this, event); |
| 756 | } |
| 757 | |
| 758 | private attachDevTools(): void { |
| 759 | const { devTools } = this.options; |
no outgoing calls