From 880b7faa6b5fc50313a8b7f5477639289f3128cd Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Sun, 31 May 2026 19:54:23 -0700 Subject: [PATCH] Fix TypeScript errors: cast response.json() to EspnStandingsResponse Co-Authored-By: Claude Sonnet 4.6 --- app/services/standings-sync/mlb.ts | 3 ++- app/services/standings-sync/mls.ts | 3 ++- app/services/standings-sync/nba.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/services/standings-sync/mlb.ts b/app/services/standings-sync/mlb.ts index 13acea6..b1b6d3f 100644 --- a/app/services/standings-sync/mlb.ts +++ b/app/services/standings-sync/mlb.ts @@ -4,6 +4,7 @@ import { parseConferenceRank, sortByWinLoss, statsMap, + type EspnStandingsResponse, } from "./espn"; const MLB_STANDINGS_URL = @@ -30,7 +31,7 @@ export class MlbStandingsAdapter implements StandingsSyncAdapter { throw new Error(`MLB standings API returned ${response.status}: ${response.statusText}`); } - const json = await response.json(); + const json = (await response.json()) as EspnStandingsResponse; const flattened = flattenEspnStandings(json); if (flattened.length === 0) { diff --git a/app/services/standings-sync/mls.ts b/app/services/standings-sync/mls.ts index e7b004d..709d010 100644 --- a/app/services/standings-sync/mls.ts +++ b/app/services/standings-sync/mls.ts @@ -3,6 +3,7 @@ import { flattenEspnStandings, parseConferenceRank, statsMap, + type EspnStandingsResponse, } from "./espn"; const MLS_STANDINGS_URL = @@ -28,7 +29,7 @@ export class MlsStandingsAdapter implements StandingsSyncAdapter { ); } - const json = await response.json(); + const json = (await response.json()) as EspnStandingsResponse; const flattened = flattenEspnStandings(json); if (flattened.length === 0) { diff --git a/app/services/standings-sync/nba.ts b/app/services/standings-sync/nba.ts index 05c9ac9..649610f 100644 --- a/app/services/standings-sync/nba.ts +++ b/app/services/standings-sync/nba.ts @@ -4,6 +4,7 @@ import { parseConferenceRank, sortByWinLoss, statsMap, + type EspnStandingsResponse, } from "./espn"; const NBA_STANDINGS_URL = @@ -16,7 +17,7 @@ export class NbaStandingsAdapter implements StandingsSyncAdapter { throw new Error(`NBA standings API returned ${response.status}: ${response.statusText}`); } - const json = await response.json(); + const json = (await response.json()) as EspnStandingsResponse; const flattened = flattenEspnStandings(json); if (flattened.length === 0) {