Open richardcrng opened 2 years ago
(There might be wider questions around typings. I've just started exploring the library - which is lovely! - and have also just had the thought that moves
could be typed for similar reasons.)
Don’t see why not. There are various things that make fully typing the framework slightly tricky, but it would be good to improve DX in several areas like this.
I assume you mean moves
on the client? There’s a more detailed discussion of that here: https://github.com/boardgameio/boardgame.io/discussions/903#discussioncomment-1656065
I wonder if the phase names could be typed, e.g. via an
enum
.This would help with things like:
next
option or thesetPhase
eventswitch
overctx.phase
with exhaustiveness checksChanges might be:
PhaseMap
Game
interface(I would be happy to contribute a PR for this if it sounds useful?)