diff --git a/packages/hydrooj/src/model/contest.ts b/packages/hydrooj/src/model/contest.ts index 122a04f98..a8fe73f6b 100644 --- a/packages/hydrooj/src/model/contest.ts +++ b/packages/hydrooj/src/model/contest.ts @@ -70,9 +70,9 @@ export function isExtended(tdoc: Tdoc) { return tdoc.penaltySince.getTime() <= now && now < tdoc.endAt.getTime(); } -function buildContestRule(def: Optional, 'applyProjection'>): ContestRule; -function buildContestRule(def: Partial>, baseRule: ContestRule): ContestRule; -function buildContestRule(def: Partial>, baseRule: ContestRule = {} as any) { +export function buildContestRule(def: Optional, 'applyProjection'>): ContestRule; +export function buildContestRule(def: Partial>, baseRule: ContestRule): ContestRule; +export function buildContestRule(def: Partial>, baseRule: ContestRule = {} as any) { const base = baseRule._originalRule || { applyProjection: (_, rdoc) => rdoc }; const funcs = ['scoreboard', 'scoreboardRow', 'scoreboardHeader', 'stat', 'applyProjection']; const f = {};