File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ import { Provider as TProvideService } from "./interface.ts";
6565import { Location as TLocationService } from "./services/location/location.js" ;
6666import { AnimateService as TAnimateService } from "./animations/interface.ts" ;
6767import { StorageBackend as TStorageBackend } from "./services/storage/interface.ts" ;
68+ import { StreamConnectionConfig as TStreamConnectionConfig } from "./services/stream/interface.ts" ;
6869declare global {
6970 interface Function {
7071 $inject ?: readonly string [ ] | undefined ;
@@ -130,5 +131,6 @@ declare global {
130131 | ( abstract new ( ...args : any [ ] ) => any ) ,
131132 > = TInjectable < T > ;
132133 type StorageBackend = TStorageBackend ;
134+ type StreamConnectionConfig = TStreamConnectionConfig ;
133135 }
134136}
Original file line number Diff line number Diff line change 1+ export interface StreamConnectionConfig {
2+ /** Called when the connection opens */
3+ onOpen ?: ( event : Event ) => void ;
4+ /** Called when a message is received */
5+ onMessage ?: ( data : any , event : Event ) => void ;
6+ /** Called when an error occurs */
7+ onError ?: ( err : any ) => void ;
8+ /** Called when a reconnect attempt happens */
9+ onReconnect ?: ( attempt : number ) => void ;
10+ /** Delay between reconnect attempts in milliseconds */
11+ retryDelay ?: number ;
12+ /** Maximum number of reconnect attempts */
13+ maxRetries ?: number ;
14+ /** Timeout in milliseconds to detect heartbeat inactivity */
15+ heartbeatTimeout ?: number ;
16+ /** Function to transform incoming messages */
17+ transformMessage ?: ( data : any ) => any ;
18+ }
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ import { Provider as TProvideService } from "./interface.ts";
6969import { Location as TLocationService } from "./services/location/location.js" ;
7070import { AnimateService as TAnimateService } from "./animations/interface.ts" ;
7171import { StorageBackend as TStorageBackend } from "./services/storage/interface.ts" ;
72- import { StreamConnectionConfig as TStreamConnectionConfig } from "./services/stream/stream " ;
72+ import { StreamConnectionConfig as TStreamConnectionConfig } from "./services/stream/interface.ts " ;
7373
7474/* ────────────────────────────────────────────────
7575 Runtime global initialization
Original file line number Diff line number Diff line change 1- interface StreamConnectionConfig {
1+ export interface StreamConnectionConfig {
22 /** Called when the connection opens */
33 onOpen ?: ( event : Event ) => void ;
44
You can’t perform that action at this time.
0 commit comments