Interface MatchValues

Properties of matches

interface MatchValues {
    active: boolean;
    bye: boolean;
    id: string;
    match: number;
    meta: {
        [key: string]: any;
    };
    path: {
        loss: string;
        win: string;
    };
    player1: {
        draw: number;
        id: string;
        loss: number;
        win: number;
    };
    player2: {
        draw: number;
        id: string;
        loss: number;
        win: number;
    };
    round: number;
}

Properties

active: boolean

If the match is active in the tournament.

Initialized as false

bye: boolean

If the match is a bye.

Initialized as false

id: string

Unique identifier of the match.

match: number

Match number of the match.

meta: {
    [key: string]: any;
}

Object for storing any additional information, useful for implementations of the library.

Initialized as {}

Type declaration

  • [key: string]: any
path: {
    loss: string;
    win: string;
}

Details about the subsequent matches for the players if the current format is elimination or stepladder.

Initialized as:

{
win: null,
loss: null
}

Type declaration

  • loss: string

    ID of the next match for the loser of the current match (or null if none).

  • win: string

    ID of the next match for the winner of the current match (or null if none).

player1: {
    draw: number;
    id: string;
    loss: number;
    win: number;
}

Details about player one in the match.

Initialized as:

{
id: null,
win: 0,
loss: 0,
draw: 0
}

Type declaration

  • draw: number

    Number of draws.

  • id: string

    ID for player one (or null if no player assigned).

  • loss: number

    Number of losses for player one.

  • win: number

    Number of wins for player one.

player2: {
    draw: number;
    id: string;
    loss: number;
    win: number;
}

Details about player two in the match.

Initialized as:

{
id: null,
win: 0,
loss: 0,
draw: 0
}

Type declaration

  • draw: number

    Number of draws for player two.

  • id: string

    ID for player two (or null if no player assigned).

  • loss: number

    Number of losses for player two.

  • win: number

    Number of wins for player two.

round: number

Round number of the match.