chore(lint): retire 19 explicit anys, ratchet to 49 warnings (#210)
Event handlers typed as React.MouseEvent, join errors as Error, the service-worker session setter as strings, the UIA policy map and the webkitAudioContext probe as narrow shapes. No behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
@@ -68,7 +68,9 @@ export const isMLDenoiseSupported = (): boolean => {
|
||||
// 1. AudioContext/webkitAudioContext (Web Audio API)
|
||||
// 2. AudioWorklet (Real-time processing in a background thread)
|
||||
// 3. getUserMedia (Microphone access)
|
||||
const hasAudioContext = !!(window.AudioContext || (window as any).webkitAudioContext);
|
||||
const hasAudioContext = !!(
|
||||
window.AudioContext || (window as Window & { webkitAudioContext?: unknown }).webkitAudioContext
|
||||
);
|
||||
// Use `typeof` rather than `!!AudioWorkletNode`: on a browser that has
|
||||
// AudioContext but no AudioWorkletNode binding (older Safari/Edge), a bare
|
||||
// reference throws ReferenceError, making this feature-detection helper throw
|
||||
|
||||
@@ -72,7 +72,10 @@ export const getLoginTermUrl = (params: UIAParams): string | undefined => {
|
||||
if (terms.policies === null) return undefined;
|
||||
if ('privacy_policy' in terms.policies && typeof terms.policies.privacy_policy === 'object') {
|
||||
if (terms.policies.privacy_policy === null) return undefined;
|
||||
const langToPolicy = terms.policies.privacy_policy as Record<string, any>;
|
||||
const langToPolicy = terms.policies.privacy_policy as Record<
|
||||
string,
|
||||
{ url?: string } | undefined
|
||||
>;
|
||||
const url = langToPolicy.en?.url;
|
||||
if (typeof url === 'string') return url;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user