Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Dec 13, 2024
1 parent c8ff8d6 commit ae553cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/web/src/client.ts.twig
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ type RealtimeRequestAuthenticate = {
session: string;
}

type TimeoutHandle = ReturnType<typeof setTimeout> | number;

/**
* Realtime interface representing the structure of a realtime communication object.
*/
Expand All @@ -141,12 +143,12 @@ type Realtime = {
/**
* Timeout for reconnect operations.
*/
timeout?: ReturnType<typeof setTimeout>;
timeout?: TimeoutHandle;

/**
* Heartbeat interval for the realtime connection.
*/
heartbeat?: ReturnType<typeof setTimeout>;
heartbeat?: TimeoutHandle;

/**
* URL for establishing the WebSocket connection.
Expand Down

0 comments on commit ae553cc

Please sign in to comment.