Fix any type usage in desktop/ (#6033)

# Description of Changes
Follow on from #5949, expanding any type usage ban to the `desktop/`
folder

Also gets rid of a bunch of really verbose desktop logging that I don't
think we really need anymore (or ever needed tbh, most of it doesn't
make sense) because it was using a bunch of `any` typing and wasn't
worth fixing.
This commit is contained in:
James Brunton
2026-04-20 12:42:38 +00:00
committed by GitHub
parent 308da01d96
commit cc9650e7a3
13 changed files with 55 additions and 112 deletions
@@ -200,11 +200,14 @@ export class EndpointAvailabilityService {
const data = await response.json();
const now = Date.now();
Object.entries(data).forEach(([endpoint, details]: [string, any]) => {
const available = details?.enabled ?? false;
this.localCache.set(endpoint, available);
this.localCacheExpiry.set(endpoint, now + this.CACHE_DURATION);
});
Object.entries(data).forEach(
([endpoint, details]: [string, unknown]) => {
const available =
(details as { enabled?: boolean })?.enabled ?? false;
this.localCache.set(endpoint, available);
this.localCacheExpiry.set(endpoint, now + this.CACHE_DURATION);
},
);
} else {
console.warn(
`[endpointAvailabilityService] Failed to preload endpoints: ${response.status}`,
@@ -313,5 +316,5 @@ export const endpointAvailabilityService = new EndpointAvailabilityService();
// Expose to window for debugging
if (typeof window !== "undefined") {
(window as any).endpointAvailabilityService = endpointAvailabilityService;
window.endpointAvailabilityService = endpointAvailabilityService;
}