@dodona/papyros
Version:
Scratchpad for multiple programming languages in the browser.
36 lines (35 loc) • 776 B
TypeScript
/**
* Enum representing all possible types for supported events
*/
export declare enum BackendEventType {
Start = "start",
End = "end",
Input = "input",
Output = "output",
Sleep = "sleep",
Error = "error",
Interrupt = "interrupt",
Loading = "loading",
Frame = "frame",
FrameChange = "frame-change",
Stop = "stop",
Files = "files",
Turtle = "turtle"
}
/**
* Interface for events used for communication between threads
*/
export interface BackendEvent {
/**
* The type of action generating this event
*/
type: BackendEventType;
/**
* The actual data stored in this event
*/
data: any;
/**
* The format used for the data to help with parsing
*/
contentType?: string;
}