Fix any type usage in the saas/ folder (#5934)

# Description of Changes
Ages ago I made #4835 to try and fix all the `any` type usage in the
system but never got it finished, and there were just too many to review
and ensure it still worked. There's even more now.

My new tactic is to fix folder by folder. This fixes the `any` typing in
the `saas/` folder, and also enables `no-unnecessary-type-assertion`,
which really helps reduce pointless `as` casts that AI generates when
the type is already known. I hope to expand both of these to the rest of
the folders soon, but one folder is better than none.
This commit is contained in:
James Brunton
2026-03-16 11:51:16 +00:00
committed by GitHub
parent 1722733802
commit dbff05814f
22 changed files with 123 additions and 112 deletions
+2 -3
View File
@@ -5,11 +5,10 @@ export * from '@core/constants/app';
// Get base URL with fallback (for use outside React components)
export const getBaseUrl = (): string => {
// Try to get from window object if set by app config
const baseUrl = (window as any).__STIRLING_PDF_BASE_URL__ || window.location.origin;
return baseUrl;
return window.__STIRLING_PDF_BASE_URL__ || window.location.origin;
};
// Helper to set base URL (to be called when app config loads)
export const setBaseUrl = (url: string): void => {
(window as any).__STIRLING_PDF_BASE_URL__ = url;
window.__STIRLING_PDF_BASE_URL__ = url;
};