refactor: explicit return types on all public functions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8d93abf36d
commit
7de503a487
@@ -348,7 +348,7 @@ export function getTournamentBracket(tournamentId: string): TournamentBracket |
|
||||
}
|
||||
|
||||
/** List tournaments with optional status filter */
|
||||
export function listTournaments(status?: 'open' | 'active' | 'finished') {
|
||||
export function listTournaments(status?: 'open' | 'active' | 'finished'): typeof schema.tournaments.$inferSelect[] {
|
||||
if (status) {
|
||||
return db.select().from(schema.tournaments)
|
||||
.where(eq(schema.tournaments.status, status))
|
||||
@@ -358,7 +358,7 @@ export function listTournaments(status?: 'open' | 'active' | 'finished') {
|
||||
}
|
||||
|
||||
/** Get pending tournament matches that need fights scheduled */
|
||||
export function getPendingMatches(tournamentId: string) {
|
||||
export function getPendingMatches(tournamentId: string): typeof schema.tournamentMatches.$inferSelect[] {
|
||||
return db.select().from(schema.tournamentMatches)
|
||||
.where(and(
|
||||
eq(schema.tournamentMatches.tournamentId, tournamentId),
|
||||
|
||||
Reference in New Issue
Block a user