@battle-racing/br-common-lib 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/game/race/LapTime.d.ts +11 -0
- package/dist/types/game/race/LapTime.js +2 -0
- package/dist/types/game/race/Race.d.ts +8 -0
- package/dist/types/game/race/index.d.ts +1 -0
- package/dist/types/game/race/index.js +1 -0
- package/package.json +1 -1
- package/src/types/game/race/LapTime.ts +14 -0
- package/src/types/game/race/Race.ts +11 -0
- package/src/types/game/race/index.ts +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Game, GameKartState } from '../Game';
|
|
2
2
|
import type { KartRankingItem } from '../KartRankingItem';
|
|
3
3
|
import type { KartProgress } from './KartProgress';
|
|
4
|
+
import { LapTime } from './LapTime';
|
|
4
5
|
export interface RaceKartState extends GameKartState {
|
|
5
6
|
currentLap: number;
|
|
6
7
|
}
|
|
@@ -15,3 +16,10 @@ export interface Race extends Game {
|
|
|
15
16
|
kartsProgress: Record<string, KartProgress[]>;
|
|
16
17
|
gameRanking: RaceRakingItem[];
|
|
17
18
|
}
|
|
19
|
+
export interface RankingWithKartsAndLapTimes extends RaceRakingItem {
|
|
20
|
+
lapTimes: LapTime[];
|
|
21
|
+
fastestLap: LapTime | null;
|
|
22
|
+
}
|
|
23
|
+
export interface RaceWithDetailedRanking extends Omit<Race, 'kartsProgress'> {
|
|
24
|
+
gameRanking: RankingWithKartsAndLapTimes[];
|
|
25
|
+
}
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./KartProgress"), exports);
|
|
18
18
|
__exportStar(require("./Race"), exports);
|
|
19
|
+
__exportStar(require("./LapTime"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface LapTime {
|
|
2
|
+
lap: number;
|
|
3
|
+
timeInSeconds: number;
|
|
4
|
+
completedAt: string;
|
|
5
|
+
completedAtCheckpointId: string;
|
|
6
|
+
completedAtCheckpointProgress: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface KartLapTimes {
|
|
10
|
+
kartGuid: string;
|
|
11
|
+
lapTimes: LapTime[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Kart } from '../../kart';
|
|
1
2
|
import type { Game, GameKartState } from '../Game';
|
|
2
3
|
import type { KartRankingItem } from '../KartRankingItem';
|
|
3
4
|
import type { KartProgress } from './KartProgress';
|
|
5
|
+
import { KartLapTimes, LapTime } from './LapTime';
|
|
4
6
|
|
|
5
7
|
export interface RaceKartState extends GameKartState {
|
|
6
8
|
currentLap: number;
|
|
@@ -18,3 +20,12 @@ export interface Race extends Game {
|
|
|
18
20
|
kartsProgress: Record<string, KartProgress[]>;
|
|
19
21
|
gameRanking: RaceRakingItem[];
|
|
20
22
|
}
|
|
23
|
+
|
|
24
|
+
export interface RankingWithKartsAndLapTimes extends RaceRakingItem {
|
|
25
|
+
lapTimes: LapTime[];
|
|
26
|
+
fastestLap: LapTime | null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RaceWithDetailedRanking extends Omit<Race, 'kartsProgress'> {
|
|
30
|
+
gameRanking: RankingWithKartsAndLapTimes[];
|
|
31
|
+
}
|