// SCHEMA export interface DelayStateScaffold { idle: any; running: { }; paused: any; completed: any; } export interface DelayStates extends DelayStateScaffold { idle: {}; waiting: {}; running: {}; paused: {}; completed: {}; } export interface DelayEventsScaffold { 'QUEUE': Function, 'PAUSE': Function, 'PLAY': Function, 'DURATION': Function, 'SPEED': Function, 'RESET': Function, 'TICK': Function, } // CONTEXT export interface DelayContext { elapsed: number; duration: number; // Note: this will come from the parent form interval: number; initialDelay: number; // Note: this will come from field type speed: number; // Note: this will come from the parent form fireAtFinish: string; } interface DelayContextUndefined { elapsed: 0; duration: 0; interval: 0; initialDelay: 0; speed: 0; fireAtFinish: ''; } export interface DelayStateSchema { initial: string; context: DelayContext; states: DelayStates }; export type DelayState = { value: 'active'; context: DelayContext & DelayContextUndefined; };