sendou.ink/app/modules/brackets-model/unions.ts
Kalle fd48bced91
Migrate Prettier/Eslint/Stylelint setup to Biome (#1772)
* Initial

* CSS lint

* Test CI

* Add 1v1, 2v2, and 3v3 Tags (#1771)

* Initial

* CSS lint

* Test CI

* Rename step

---------

Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
2024-06-24 13:07:17 +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" | "draw" | "loss";