You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @property {SourceSelect} select Select an event from the stream.
Because of this the type of the readable store returned by the json function is always any.
But in my opinion it would also be more useful to specify the generic when calling select instead of source because different events can emit different kinds of data.
What are your thoughts on that? Am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered:
razshare
added
the
seen
I've seen and read this issue and I'll try find some time soon to work on it.
label
Oct 1, 2024
First of all thanks for creating this library! Its the first time I'm having fun working with SSE.
I tried to use the
json
function but noticed that the typing is kinda odd to me.When creating a listener with
source
you can pass in a generic which then isn't passed down to theselect
function:sveltekit-sse/src/lib/types.external.js
Line 169 in df70401
Because of this the type of the readable store returned by the
json
function is always any.But in my opinion it would also be more useful to specify the generic when calling
select
instead ofsource
because different events can emit different kinds of data.What are your thoughts on that? Am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: