Who imports who · hover a node No overview comment at the top of the file.
Imports SendouQMatch Used by 1 action 1 repository 2 components Types
interface RejoinVoteno JSDoc :5 export interface RejoinVote {
userId: number ;
isContinuing: boolean ;
}Functions & values
ONGOING until every member of a full group has voted, then RESOLVED with the ids continuing, or FAILED if too few to form a viable group.
export function result (votes: RejoinVote [])Unit tests (3) function agreedNominatedUserId:36 The one player both teams named as a cause of the cancellation, or null when they named nobody in common or agreed on more than one.
export function agreedNominatedUserId (nominationsByTeam: number [][])Unit tests (1) function userContinueStatus:46 The user's vote, or null if they have not voted.
export function userContinueStatus (votes: RejoinVote [], userId: number )Unit tests (2) Whether the user may still cast isContinuing: a first vote while ongoing, or changing a yes to a no; a no is final.
export function canCastVote (
votes: RejoinVote [],
userId: number ,
isContinuing: boolean ,
)Unit tests (5) Votes cast within the viewer's own group, or null if they are in neither side of the match.
export function extractOwnGroupVotesFromSendouqMatch (
match: Pick <SQMatch , "groupAlpha" | "groupBravo" >,
userId: number ,
): RejoinVote [] | null Unit tests (2) function currentUserIds:94 Group member ids minus anyone who voted against continuing.
export function currentUserIds (
votes: RejoinVote [],
groupMemberIds: number [],
): number []Unit tests (1) No overview comment at the top of the file.
Imports no other modules Used by 1 action 1 route 1 repository 2 modules 3 components Functions & values
Each group's map win count and whether one has reached the best-of's required wins.
export function score (match: {
mapList: Array <{ winnerGroupId: number | null }>;
groupAlpha: { id: number };
groupBravo: { id: number };
})Unit tests (3) Members of both groups of the match, alpha's first.
export function allMembers <T >(match: {
groupAlpha: { members: T [] };
groupBravo: { members: T [] };
}): T []function resolveGroupMemberOf:36 The user's side of the match, or null if in neither group.
export function resolveGroupMemberOf (args: {
groupAlpha: { members: { id: number }[] };
groupBravo: { members: { id: number }[] };
userId: number | null | undefined ;
}): "ALPHA" | "BRAVO" | null Tier a group held when its match started, from the snapshot taken then (thresholds shift with the season's distribution). undefined for matches predating the snapshot.
export function groupTier (group: {
tierName: TierName | null ;
tierIsPlus: DBBoolean ;
})Tier a member held when their match started, snapshotted the same way as {@link groupTier}. "CALCULATING" when they had too few ranked sets of the season to have a tier.
export function memberTier (member: {
tierName: TierName | "CALCULATING" | null ;
tierIsPlus: DBBoolean ;
})No overview comment at the top of the file.
Imports no other modules Used by 1 repository 1 module 1 component Types
type UserSkillDifferenceno JSDoc :12 export type UserSkillDifference =
| {
calculated: true ;
spDiff: number ;
oldSp?: number ;
newSp?: number ;
}
| CalculatingSkill ;type GroupSkillDifferenceno JSDoc :21 export type GroupSkillDifference =
| {
calculated: true ;
oldSp: number ;
newSp: number ;
}
| CalculatingSkill ;A rating a match produced with the one it replaced (two consecutive season Skill rows). previous* are null for the season's first rating.
export interface RatingChange {
ordinal: number ;
previousOrdinal: number | null ;
previousMatchesCount: number | null ;
}Functions & values
What a match did to one player's SP, as their match page shows it.
export function forUser (change: RatingChange ): UserSkillDifference Unit tests (3) What a match did to one group's team SP, as their match page shows it.
export function forGroup (change: RatingChange ): GroupSkillDifference Unit tests (2)