64-65: Consider type-safe configuration instead of window global.
Using (window as any).WS_DEBOUNCE_PERIOD_MS works but bypasses type checking. For better maintainability, consider a typed configuration approach:
declare global {
interface Window {
WS_DEBOUNCE_PERIOD_MS?: number;
}
}
const debouncePeriod = window.WS_DEBOUNCE_PERIOD_MS ?? DEFAULT_DEBOUNCE_MS;
This makes the global explicit and allows TypeScript to catch typos.
Originally posted by @coderabbitai[bot] in #476 (review)
It would improve our code quality to have a type safe configuration for the .env variables
64-65: Consider type-safe configuration instead of window global.Using
(window as any).WS_DEBOUNCE_PERIOD_MSworks but bypasses type checking. For better maintainability, consider a typed configuration approach:This makes the global explicit and allows TypeScript to catch typos.
Originally posted by @coderabbitai[bot] in #476 (review)
It would improve our code quality to have a type safe configuration for the .env variables