MatthewWid / better-sse

⬆ Dead simple, dependency-less, spec-compliant server-sent events implementation for Node, written in TypeScript.
https://matthewwid.github.io/better-sse/
MIT License
558 stars 14 forks source link

Fix default state being `unknown` when creating sessions and channels with factories #72

Closed MatthewWid closed 1 month ago

MatthewWid commented 1 month ago

This PR fixes an issue where, when creating a session or channel with createSession or createChannel, if no explicit type is given to the State generic it defaults to unknown rather than DefaultSessionState or DefaultChannelState, respectively.