sendou.ink/app/modules/brackets-model/unions.ts
Kalle d4d6002344
New results tab for tournaments (#1876)
* Initial

* Try npm in deploy script

* Progress

* Progress

* Progress

* Add missing index

* Title to user results page

* Hide SPR before tournament over

* Results page and redirect

* SPR info

* Row bg colors

* Laoyut shift fix

* Hide Swiss start round button if bracket is in preview

* Fix e2e test

* Not needed

* one more revert
2024-09-08 11:25:10 +03:00

61 lines
1.3 KiB
TypeScript

/*----------------------------------------|
* Contains all the string union types.
*---------------------------------------*/
/**
* The only supported types of stage.
*/
export type StageType =
| "round_robin"
| "single_elimination"
| "double_elimination"
| "swiss";
/**
* All the possible types of group in an elimination stage.
*
* - `single_bracket` for single elimination.
* - `winner_bracket` and `loser_bracket` for double elimination.
* - `final_group` for both single and double elimination.
*/
export type GroupType =
| "single_bracket"
| "winner_bracket"
| "loser_bracket"
| "final_group";
/**
* The possible types for a double elimination stage's grand final.
*/
export type GrandFinalType = "none" | "simple" | "double";
/**
* The possible types of final for an elimination stage.
*/
export type FinalType = "consolation_final" | "grand_final";
/**
* The possible modes for a round-robin stage.
*/
export type RoundRobinMode = "simple" | "double";
/**
* Used to order seeds.
*/
export type SeedOrdering =
| "natural"
| "reverse"
| "half_shift"
| "reverse_half_shift"
| "pair_flip"
| "inner_outer"
| "space_between"
| "groups.effort_balanced"
| "groups.seed_optimized"
| "groups.bracket_optimized";
/**
* The possible results of a duel for a participant.
*/
export type Result = "win" | "loss";