From be6f07b8c92b9e8d125578752399e84d794564c4 Mon Sep 17 00:00:00 2001 From: lorentz Date: Sat, 11 Jul 2026 07:24:15 -0400 Subject: [PATCH] fix(12): WR-03 follow-up - fix TS type narrowing on token return --- lib/services/pax8-client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/services/pax8-client.ts b/lib/services/pax8-client.ts index 0885f0d..2f4685c 100644 --- a/lib/services/pax8-client.ts +++ b/lib/services/pax8-client.ts @@ -58,9 +58,10 @@ export class Pax8Client { if (!data.access_token || typeof data.expires_in !== 'number') { throw new Error('PAX8 token response missing access_token/expires_in'); } - this.accessToken = data.access_token; + const token: string = data.access_token; + this.accessToken = token; this.tokenExpiry = Date.now() + data.expires_in * 1000; - return this.accessToken; + return token; } // Phase 11/12 will extend this with 429-aware Retry-After backoff for the