mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: optimize scoreboard
This commit is contained in:
1 parent
f08ac664da
commit
af0649f471
13 files changed
+55
-102
No files matched your search
@@ -105,7 +105,15 @@ export interface UserPreferenceDoc {
|
||||
export type ownerInfo = { owner: number, maintainer?: number[] };
|
||||
|
||||
export type User = import('./model/user').User;
|
||||
export type Udict = NumericDictionary<User>;
|
||||
export type Udict = Record<number, User>;
|
||||
|
||||
export interface BaseUser {
|
||||
_id: number;
|
||||
uname: string;
|
||||
avatar: string;
|
||||
displayName: string;
|
||||
}
|
||||
export type BaseUserDict = Record<number, BaseUser>;
|
||||
|
||||
export interface FileInfo {
|
||||
/** storage path */
|
||||
@@ -507,7 +515,7 @@ export interface ContestRule<T = any> {
|
||||
scoreboard: (
|
||||
this: ContestRule<T>, isExport: boolean, _: (s: string) => string,
|
||||
tdoc: Tdoc<30>, pdict: ProblemDict, cursor: Cursor<ContestStat & T>,
|
||||
) => Promise<[board: ScoreboardRow[], udict: Udict]>;
|
||||
) => Promise<[board: ScoreboardRow[], udict: BaseUserDict]>;
|
||||
ranked: (tdoc: Tdoc<30>, cursor: Cursor<ContestStat & T>) => Promise<[number, ContestStat & T][]>;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user