From 152c16306ce9a0a5b4bcda022ae464a9cbc9fca6 Mon Sep 17 00:00:00 2001 From: zkldi Date: Fri, 30 Apr 2021 16:42:07 +0100 Subject: [PATCH] Add customRatings support --- common/js/types.d.ts | 8 ++++---- common/src/types.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/js/types.d.ts b/common/js/types.d.ts index bf90bac58..d958c1dbf 100644 --- a/common/js/types.d.ts +++ b/common/js/types.d.ts @@ -463,13 +463,13 @@ export interface PublicUserDocument extends MongoDBDocument { }; clan: string | null; } -export interface UserGameStats extends MongoDBDocument { +export interface UserGameStats extends MongoDBDocument { userID: integer; - game: T; - playtype: Playtypes[T]; + game: IDStringToGame[I]; + playtype: IDStringToPlaytype[I]; rating: number; lampRating: number; - customRatings: Record; + customRatings: GameSpecificCalcLookup[I]; classes: Record; } /** diff --git a/common/src/types.ts b/common/src/types.ts index e7874e1ab..89da4f684 100644 --- a/common/src/types.ts +++ b/common/src/types.ts @@ -636,14 +636,14 @@ export interface PublicUserDocument extends MongoDBDocument { clan: string | null; } -export interface UserGameStats extends MongoDBDocument { +export interface UserGameStats extends MongoDBDocument { userID: integer; - game: T; - playtype: Playtypes[T]; + game: IDStringToGame[I]; + playtype: IDStringToPlaytype[I]; rating: number; lampRating: number; - customRatings: Record; - classes: Record; + customRatings: GameSpecificCalcLookup[I]; + classes: Record; // bad } // the bottom set of types are horrifically confusing.