Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

threadState.ts

16 lines527 Bytes

1import type { OrchestrationThread } from "@t3tools/contracts";
2import * as Option from "effect/Option";
3​
4export type EnvironmentThreadStatus = "empty" | "cached" | "synchronizing" | "live" | "deleted";
5​
6export interface EnvironmentThreadState {
7 readonly data: Option.Option<OrchestrationThread>;
8 readonly status: EnvironmentThreadStatus;
9 readonly error: Option.Option<string>;
11​
12export const EMPTY_ENVIRONMENT_THREAD_STATE: EnvironmentThreadState = {
13 data: Option.none(),
14 status: "empty",
15 error: Option.none(),
16};