MatthewWid / better-sse

⬆ Dead simple, dependency-less, spec-compliant server-sent events implementation for Node, written in TypeScript.
MIT License
499 stars 14 forks source link

Add generic type for Session#state #26

Closed MatthewWid closed 2 years ago

MatthewWid commented 3 years ago

Add a generic parameter to the Session class that allows the user to type the state property, instead of it always being of type Record<string, unknown> and forcing the user to cast it to their own type every time they reference.

MatthewWid commented 2 years ago

This is now completed and will be available in the next release.

MatthewWid commented 2 years ago

Resolved by #28.