fix: preserve literal types for mongoose queries and seed data

This commit is contained in:
dahyeon committed 2026-11-11 20:21:51 +09:00
1 parent fbf22284e8
commit 2d8027cb16
3 files changed
+6 -6

No files matched your search

@@ -317,11 +317,11 @@ function buildMatchPayload(
description:
'결과 페이지 검증용으로 생성된 30명, 6팀, 15경기 완료 임시 데이터입니다.',
mapId: 11,
status: 'finished',
status: 'finished' as const,
scheduledAt: options.scheduledAt,
maxParticipants: TOTAL_PLAYERS,
gameCount: GAME_COUNT_PER_SERIES_GROUP,
gameMode: 'round-robin',
gameMode: 'round-robin' as const,
tournamentCodeIds: [],
teamBuiltAt: new Date(options.scheduledAt.getTime() - 30 * 60000),
participants,
@@ -336,10 +336,10 @@ function buildMatchPayload(
resultPollState: {
startedAt: new Date(options.scheduledAt.getTime() + 2 * 60 * 60 * 1000),
lastPolledAt: now,
lastPollOutcome: 'matched',
lastPollOutcome: 'matched' as const,
matchedCount: games.length,
expandedToAllPuuids: true,
state: 'complete',
state: 'complete' as const,
},
legacyImported: true,
legacyImportSource: {
@@ -540,7 +540,7 @@ export class TournamentCodeService {
): Promise<MatchDocument[]> {
const MatchModel = await this.connectionService.getModel('match');
const filter: {
status: { $in: string[] };
status: { $in: MatchDocument['status'][] };
communityId?: mongoose.Types.ObjectId;
} = {
status: { $in: ['team-built', 'in-progress'] },
@@ -243,7 +243,7 @@ export class CompetitionOutboxProcessor
function leaseFilter(event: ClaimedOutboxEvent) {
return {
_id: event._id,
state: 'pending',
state: 'pending' as const,
attemptCount: event.attemptCount,
};
}