begin implementing mechanism of declaring 'Plant' (e.g., digital watch, microwave oven) to simulate a plant interactively
This commit is contained in:
parent
97d42c1cef
commit
0da2c793cd
2 changed files with 52 additions and 0 deletions
11
src/Plant/Plant.ts
Normal file
11
src/Plant/Plant.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { EventTrigger } from "@/statecharts/label_ast";
|
||||
import { RaisedEvent } from "@/statecharts/runtime_types";
|
||||
import { ReactElement } from "react";
|
||||
|
||||
export type Plant<StateType> = {
|
||||
inputEvents: EventTrigger[];
|
||||
outputEvents: EventTrigger[];
|
||||
|
||||
reducer: (inputEvent: RaisedEvent, state: StateType) => StateType;
|
||||
render: (state: StateType) => ReactElement;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue