Skip to content

Commit 6b6b0c7

Browse files
committed
Fix type
1 parent 8686814 commit 6b6b0c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/ws/protocol.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { t, type Static } from "elysia"
44
import { Input as GetMeInput } from "@in/server/methods/getMe"
55
import { nanoid } from "nanoid/non-secure"
66
import { TUpdate } from "@in/server/models"
7+
import type { StaticDecode, StaticEncode } from "@sinclair/typebox"
78

89
const Methods = t.Union([
910
t.Object({
@@ -97,7 +98,7 @@ export const ServerMessage = t.Union([
9798
}),
9899
])
99100

100-
export type ServerMessageType = Static<typeof ServerMessage>
101+
export type ServerMessageType = StaticDecode<typeof ServerMessage>
101102

102103
export const enum ClientMessageKind {
103104
ConnectionInit = 1, // used for connection initialization with auth

0 commit comments

Comments
 (0)