Farmbot-Web-App/frontend/interfaces.ts

32 lines
1.0 KiB
TypeScript
Raw Normal View History

2017-06-29 12:54:02 -06:00
import { AuthState } from "./auth/interfaces";
import { ConfigState } from "./config/interfaces";
import { BotState } from "./devices/interfaces";
import { Color as FarmBotJsColor } from "farmbot";
2017-06-29 12:54:02 -06:00
import { DraggableState } from "./draggable/interfaces";
import { RestResources } from "./resources/interfaces";
/** Regimens and sequences may have a "color" which determines how it looks
in the UI. Only certain colors are valid. */
2019-01-13 17:16:22 -07:00
export type ResourceColor = FarmBotJsColor;
2017-06-29 12:54:02 -06:00
export interface Everything {
config: ConfigState;
auth: AuthState | undefined;
dispatch: Function;
bot: BotState;
draggable: DraggableState;
resources: RestResources;
}
/** There were a few cases where we handle errors that are legitimately unknown.
* In those cases, we can use the `UnsafeError` type instead of `any`, just to
* quiet down the linter and to let others know it is inherently unsafe.
*/
2017-09-28 12:07:34 -06:00
// tslint:disable-next-line:no-any
2017-06-29 12:54:02 -06:00
export type UnsafeError = any;
2019-04-09 23:17:03 -06:00
export interface TimeSettings {
utcOffset: number;
hour24: boolean;
}