Add customRatings support

This commit is contained in:
zkldi
2021-04-30 16:42:07 +01:00
parent 1b1dedf819
commit 152c16306c
2 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -463,13 +463,13 @@ export interface PublicUserDocument extends MongoDBDocument {
};
clan: string | null;
}
export interface UserGameStats<T extends Game = Game> extends MongoDBDocument {
export interface UserGameStats<I extends IDStrings> extends MongoDBDocument {
userID: integer;
game: T;
playtype: Playtypes[T];
game: IDStringToGame[I];
playtype: IDStringToPlaytype[I];
rating: number;
lampRating: number;
customRatings: Record<string, number>;
customRatings: GameSpecificCalcLookup[I];
classes: Record<string, string>;
}
/**
+5 -5
View File
@@ -636,14 +636,14 @@ export interface PublicUserDocument extends MongoDBDocument {
clan: string | null;
}
export interface UserGameStats<T extends Game = Game> extends MongoDBDocument {
export interface UserGameStats<I extends IDStrings> extends MongoDBDocument {
userID: integer;
game: T;
playtype: Playtypes[T];
game: IDStringToGame[I];
playtype: IDStringToPlaytype[I];
rating: number;
lampRating: number;
customRatings: Record<string, number>;
classes: Record<string, string>;
customRatings: GameSpecificCalcLookup[I];
classes: Record<string, string>; // bad
}
// the bottom set of types are horrifically confusing.