File tree 1 file changed +2
-2
lines changed
Filter options
packages/core/useEventSource
1 file changed +2
-2
lines changed
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export interface UseEventSourceReturn<Events extends string[], Data = any> {
55
55
* Reference to the latest data received via the EventSource,
56
56
* can be watched to respond to incoming messages
57
57
*/
58
- data : ShallowRef < Data >
58
+ data : ShallowRef < Data | null >
59
59
60
60
/**
61
61
* The current state of the connection, can be only one of:
@@ -114,7 +114,7 @@ export function useEventSource<Events extends string[], Data = any>(
114
114
url : MaybeRefOrGetter < string | URL | undefined > ,
115
115
events : Events = [ ] as unknown as Events ,
116
116
options : UseEventSourceOptions = { } ,
117
- ) : UseEventSourceReturn < Events > {
117
+ ) : UseEventSourceReturn < Events , Data > {
118
118
const event : ShallowRef < string | null > = shallowRef ( null )
119
119
const data : ShallowRef < Data | null > = shallowRef ( null )
120
120
const status = shallowRef < EventSourceStatus > ( 'CONNECTING' )
You can’t perform that action at this time.
0 commit comments