feat: preserve explicit round robin pairings
This commit is contained in:
1 parent
640e593676
commit
c2f89f9cb2
5 files changed
+347
-34
No files matched your search
@@ -3,6 +3,7 @@ import type {
|
||||
CompetitionId,
|
||||
CompletedSeriesProjection,
|
||||
InProgressSeriesProjection,
|
||||
RoundRobinCompetitionFormat,
|
||||
SeriesOutcome,
|
||||
TeamId,
|
||||
} from "../src/index.js";
|
||||
@@ -26,3 +27,23 @@ export type InProgressSeriesCannotExposeOutcome = Expect<
|
||||
export type LegacyBracketModeIsNotACompetitionFormat = Expect<
|
||||
Not<IsAssignable<{ type: "bracket" }, CompetitionFormat>>
|
||||
>;
|
||||
|
||||
type ExplicitRoundRobinPairing = NonNullable<
|
||||
RoundRobinCompetitionFormat["pairings"]
|
||||
>[number];
|
||||
|
||||
export type ExplicitRoundRobinPairingsAreOptional = Expect<
|
||||
IsAssignable<{}, Pick<RoundRobinCompetitionFormat, "pairings">>
|
||||
>;
|
||||
|
||||
export type ExplicitRoundRobinPairingsAreTeamIdBased = Expect<
|
||||
IsAssignable<
|
||||
ExplicitRoundRobinPairing,
|
||||
{
|
||||
roundNumber: number;
|
||||
matchNumber: number;
|
||||
teamAId: TeamId;
|
||||
teamBId: TeamId;
|
||||
}
|
||||
>
|
||||
>;
|
||||
Reference in new issue
Block a user