Closed earthiverse closed 1 year ago
Wow that's a lot of types!
Thankfully, the two interfaces at the bottom can almost be imoprted as-is into this package so they can then be used with the TypedEventEmitter
we attach to parent.socket
.
But it's probably gonna be a lot of work to update those types to use ours and do some refactoring where appropriate.
@thmsndk How do you feel about that?
that's a lot of types!
Thankfully, the two interfaces at the bottom can almost be imoprted as-is into this package so they can then be used with the
TypedEventEmitter
we attach toparent.socket
.But it's probably gonna be a lot of work to update those types to use ours and do some refactoring where appropriate. @thmsndk How do you feel about that?
Haven't looked into it, probably a good idea to type the socket events properly. Perhaps we can chop it up into different tasks so it's not up to one person to type it all?
How would we type them properly?
What would be the most ideal way to type them?
Is it one single file per event that we then merge into one object?
Do we try to split the event per some kind of arbitrary category (like we could do for the functions) but this sounds very hard, I think it's gonna be hard to find the proper categories.
Released in typed-adventureland@0.0.21
.
I made a branch on ALClient to experiment with replacing most of my current types with this project.
One of the bigger things this project could implement would be the types for socket events.
https://github.com/earthiverse/ALClient/blob/master/source/definitions/adventureland-server.ts should have pretty much only socket-related things.
I have captured socket data in various files in https://github.com/earthiverse/ALClient/tree/master/source/definitions, too