Skip to content

Commit 34c48b9

Browse files
use type instead of infer
1 parent abbd3bd commit 34c48b9

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

apps/web/src/components/ChatView.browser.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
type WsWelcomePayload,
1212
WS_CHANNELS,
1313
WS_METHODS,
14+
OrchestrationSessionStatus,
1415
} from "@t3tools/contracts";
1516
import { RouterProvider, createMemoryHistory } from "@tanstack/react-router";
1617
import { HttpResponse, http, ws } from "msw";
@@ -58,13 +59,6 @@ interface ViewportSpec {
5859
attachmentTolerancePx: number;
5960
}
6061

61-
type SnapshotSessionStatus =
62-
OrchestrationReadModel["threads"][number]["session"] extends infer Session
63-
? Session extends { status: infer Status }
64-
? Status
65-
: never
66-
: never;
67-
6862
const DEFAULT_VIEWPORT: ViewportSpec = {
6963
name: "desktop",
7064
width: 960,
@@ -160,7 +154,7 @@ function createSnapshotForTargetUser(options: {
160154
targetMessageId: MessageId;
161155
targetText: string;
162156
targetAttachmentCount?: number;
163-
sessionStatus?: SnapshotSessionStatus;
157+
sessionStatus?: OrchestrationSessionStatus;
164158
}): OrchestrationReadModel {
165159
const messages: Array<OrchestrationReadModel["threads"][number]["messages"][number]> = [];
166160

0 commit comments

Comments
 (0)