Skip to content

Commit ae553cc

Browse files
committed
fix: types
1 parent c8ff8d6 commit ae553cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/web/src/client.ts.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ type RealtimeRequestAuthenticate = {
129129
session: string;
130130
}
131131

132+
type TimeoutHandle = ReturnType<typeof setTimeout> | number;
133+
132134
/**
133135
* Realtime interface representing the structure of a realtime communication object.
134136
*/
@@ -141,12 +143,12 @@ type Realtime = {
141143
/**
142144
* Timeout for reconnect operations.
143145
*/
144-
timeout?: ReturnType<typeof setTimeout>;
146+
timeout?: TimeoutHandle;
145147

146148
/**
147149
* Heartbeat interval for the realtime connection.
148150
*/
149-
heartbeat?: ReturnType<typeof setTimeout>;
151+
heartbeat?: TimeoutHandle;
150152

151153
/**
152154
* URL for establishing the WebSocket connection.

0 commit comments

Comments
 (0)