@vaadin/hilla-frontend 24.7.0-alpha9 → 24.7.0-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,75 +1,74 @@
1
- import type { Subscription } from './Connect.js';
1
+ import type { Subscription } from "./Connect.js";
2
2
  export declare enum State {
3
- ACTIVE = "active",
4
- INACTIVE = "inactive",
5
- RECONNECTING = "reconnecting"
3
+ ACTIVE = "active",
4
+ INACTIVE = "inactive",
5
+ RECONNECTING = "reconnecting",
6
6
  }
7
7
  type ActiveEvent = CustomEvent<{
8
- active: boolean;
8
+ active: boolean
9
9
  }>;
10
10
  interface EventMap {
11
- 'state-changed': ActiveEvent;
11
+ "state-changed": ActiveEvent;
12
12
  }
13
13
  type ListenerType<T extends keyof EventMap> = ((this: FluxConnection, ev: EventMap[T]) => any) | {
14
- handleEvent(ev: EventMap[T]): void;
14
+ handleEvent(ev: EventMap[T]): void
15
15
  } | null;
16
16
  /**
17
- * Possible options for dealing with lost subscriptions after a websocket is reopened.
18
- */
17
+ * Possible options for dealing with lost subscriptions after a websocket is reopened.
18
+ */
19
19
  export declare enum ActionOnLostSubscription {
20
- /**
21
- * The subscription should be resubscribed using the same server method and parameters.
22
- */
23
- RESUBSCRIBE = "resubscribe",
24
- /**
25
- * The subscription should be removed.
26
- */
27
- REMOVE = "remove"
20
+ /**
21
+ * The subscription should be resubscribed using the same server method and parameters.
22
+ */
23
+ RESUBSCRIBE = "resubscribe",
24
+ /**
25
+ * The subscription should be removed.
26
+ */
27
+ REMOVE = "remove",
28
28
  }
29
29
  /**
30
- * Possible states of a flux subscription.
31
- */
30
+ * Possible states of a flux subscription.
31
+ */
32
32
  export declare enum FluxSubscriptionState {
33
- /**
34
- * The subscription is not connected and is trying to connect.
35
- */
36
- CONNECTING = "connecting",
37
- /**
38
- * The subscription is connected and receiving updates.
39
- */
40
- CONNECTED = "connected",
41
- /**
42
- * The subscription is closed and is not trying to reconnect.
43
- */
44
- CLOSED = "closed"
33
+ /**
34
+ * The subscription is not connected and is trying to connect.
35
+ */
36
+ CONNECTING = "connecting",
37
+ /**
38
+ * The subscription is connected and receiving updates.
39
+ */
40
+ CONNECTED = "connected",
41
+ /**
42
+ * The subscription is closed and is not trying to reconnect.
43
+ */
44
+ CLOSED = "closed",
45
45
  }
46
46
  /**
47
- * Event wrapper for flux subscription connection state change callback
48
- */
47
+ * Event wrapper for flux subscription connection state change callback
48
+ */
49
49
  export type FluxSubscriptionStateChangeEvent = CustomEvent<{
50
- state: FluxSubscriptionState;
50
+ state: FluxSubscriptionState
51
51
  }>;
52
52
  /**
53
- * A representation of the underlying persistent network connection used for subscribing to Flux type endpoint methods.
54
- */
53
+ * A representation of the underlying persistent network connection used for subscribing to Flux type endpoint methods.
54
+ */
55
55
  export declare class FluxConnection extends EventTarget {
56
- #private;
57
- state: State;
58
- wasClosed: boolean;
59
- constructor(connectPrefix: string, atmosphereOptions?: Partial<Atmosphere.Request>);
60
- /**
61
- * Subscribes to the flux returned by the given endpoint name + method name using the given parameters.
62
- *
63
- * @param endpointName - the endpoint to connect to
64
- * @param methodName - the method in the endpoint to connect to
65
- * @param parameters - the parameters to use
66
- * @returns a subscription
67
- */
68
- subscribe(endpointName: string, methodName: string, parameters?: unknown[]): Subscription<any>;
56
+ #private;
57
+ state: State;
58
+ wasClosed: boolean;
59
+ constructor(connectPrefix: string, atmosphereOptions?: Partial<Atmosphere.Request>);
60
+ /**
61
+ * Subscribes to the flux returned by the given endpoint name + method name using the given parameters.
62
+ *
63
+ * @param endpointName - the endpoint to connect to
64
+ * @param methodName - the method in the endpoint to connect to
65
+ * @param parameters - the parameters to use
66
+ * @returns a subscription
67
+ */
68
+ subscribe(endpointName: string, methodName: string, parameters?: unknown[]): Subscription<any>;
69
69
  }
70
70
  export interface FluxConnection {
71
- addEventListener<T extends keyof EventMap>(type: T, listener: ListenerType<T>): void;
72
- removeEventListener<T extends keyof EventMap>(type: T, listener: ListenerType<T>): void;
71
+ addEventListener<T extends keyof EventMap>(type: T, listener: ListenerType<T>): void;
72
+ removeEventListener<T extends keyof EventMap>(type: T, listener: ListenerType<T>): void;
73
73
  }
74
74
  export {};
75
- //# sourceMappingURL=FluxConnection.d.ts.map