RoadRecord型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One finalist's record on the way.
インポート
import type { RoadRecord } from "@johnmorrisdotca/taisen-brackets/road";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
interface RoadRecord {
name: string;
matches: number;
won: number;
drawn: number;
lost: number;
scored: number;
conceded: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
name | string | |
matches | number | Matches played in the group and the knockout rounds (not the final), and how many it won, drew and lost. |
won | number | |
drawn | number | |
lost | number | |
scored | number | The goals it scored and let in over the matches whose score is a pair of numbers. |
conceded | number |
例
import { roadToFinal, type RoadRecord } from "@johnmorrisdotca/taisen-brackets";
const chart = roadToFinal([{ name: "Owls", path: [{ round: "semi-final", opponent: { name: "Stars" }, score: [2, 0] }] }, { name: "Gulls", path: [] }]);
const owls: RoadRecord = chart.totals.finalists[0];
console.log(owls.matches, owls.won, owls.scored);1 1 2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。