fix(12): WR-03 follow-up - fix TS type narrowing on token return

This commit is contained in:
lorentz 2026-07-11 07:24:15 -04:00
parent 1bb2b8b0a2
commit be6f07b8c9

View file

@ -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