Lichess4545/Chesster

Using a sum type for pairings

Opened this issue · 0 comments

https://github.com/Lichess4545/Chesster/blob/main/src/league.ts#L35-L45

I think we should consider making that into a sumtype of LonePlayerPairing and TeamPlayerPairing, TeamPlayerPairing can require the teams to be set, and we can provide typeguards. I think that would help us catch some of these issues sooner.