diff --git a/src/app/components/DeviceVerificationSetup.tsx b/src/app/components/DeviceVerificationSetup.tsx index 769ac5d7..dd2b8b1d 100644 --- a/src/app/components/DeviceVerificationSetup.tsx +++ b/src/app/components/DeviceVerificationSetup.tsx @@ -30,7 +30,7 @@ function makeUIAAction( authData: IAuthData, performAction: PerformAction, resolve: (data: T) => void, - reject: (error?: any) => void, + reject: (error?: unknown) => void, ): UIAAction { const action: UIAAction = { authData, diff --git a/src/app/components/SecretStorage.tsx b/src/app/components/SecretStorage.tsx index be83a449..6dba7460 100644 --- a/src/app/components/SecretStorage.tsx +++ b/src/app/components/SecretStorage.tsx @@ -1,6 +1,7 @@ import React, { FormEventHandler, useCallback } from 'react'; import { Box, Text, Button, Spinner, color } from 'folds'; import { decodeRecoveryKey, deriveRecoveryKeyFromPassphrase } from 'matrix-js-sdk/lib/crypto-api'; +import { SecretStorageKeyDescriptionAesV1 } from 'matrix-js-sdk/lib/secret-storage'; import { PasswordInput } from './password-input'; import { SecretStorageKeyContent, @@ -39,7 +40,10 @@ export function SecretStorageRecoveryPassphrase({ bits, ); - const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent as any); + const match = await mx.secretStorage.checkKey( + decodedRecoveryKey, + keyContent as SecretStorageKeyDescriptionAesV1, + ); if (!match) { throw new Error('Invalid recovery passphrase.'); @@ -131,7 +135,10 @@ export function SecretStorageRecoveryKey({ async (recoveryKey) => { const decodedRecoveryKey = decodeRecoveryKey(recoveryKey); - const match = await mx.secretStorage.checkKey(decodedRecoveryKey, keyContent as any); + const match = await mx.secretStorage.checkKey( + decodedRecoveryKey, + keyContent as SecretStorageKeyDescriptionAesV1, + ); if (!match) { throw new Error('Invalid recovery key.'); diff --git a/src/app/components/account-switcher/AccountSwitcher.tsx b/src/app/components/account-switcher/AccountSwitcher.tsx index 6310052e..7882f238 100644 --- a/src/app/components/account-switcher/AccountSwitcher.tsx +++ b/src/app/components/account-switcher/AccountSwitcher.tsx @@ -68,12 +68,12 @@ const deleteAllMatrixDatabases = async (): Promise => { // Try to get all databases if the API is available try { if ('databases' in indexedDB) { - const allDbs = await (indexedDB as any).databases(); + const allDbs = await indexedDB.databases(); const matrixDbs = allDbs - .map((db: any) => db.name) + .map((db) => db.name) .filter( - (name: string) => - name && + (name): name is string => + typeof name === 'string' && (name.startsWith('matrix-js-sdk') || name.includes('@@') || name.startsWith('sync@@') || diff --git a/src/app/components/create-room/utils.ts b/src/app/components/create-room/utils.ts index 0115fe7b..c2ed09e1 100644 --- a/src/app/components/create-room/utils.ts +++ b/src/app/components/create-room/utils.ts @@ -1,4 +1,5 @@ import { + EventType, ICreateRoomOpts, ICreateRoomStateEvent, JoinRule, @@ -6,7 +7,7 @@ import { RestrictedAllowType, Room, } from 'matrix-js-sdk'; -import { RoomJoinRulesEventContent } from 'matrix-js-sdk/lib/types'; +import { RoomJoinRulesEventContent, SpaceChildEventContent } from 'matrix-js-sdk/lib/types'; import { CreateRoomKind } from './CreateRoomKindSelector'; import { RoomType, StateEvent } from '../../../types/matrix/room'; import { getViaServers } from '../../plugins/via-servers'; @@ -17,7 +18,7 @@ export const createRoomCreationContent = ( allowFederation: boolean, additionalCreators: string[] | undefined, ): object => { - const content: Record = {}; + const content: Record = {}; if (typeof type === 'string') { content.type = type; } @@ -144,12 +145,12 @@ export const createRoom = async (mx: MatrixClient, data: CreateRoomData): Promis if (data.parent) { await mx.sendStateEvent( data.parent.roomId, - StateEvent.SpaceChild as any, + EventType.SpaceChild, { auto_join: false, suggested: false, via: [getMxIdServer(mx.getUserId() ?? '') ?? ''], - }, + } as SpaceChildEventContent, result.room_id, ); } diff --git a/src/app/components/editor/Editor.tsx b/src/app/components/editor/Editor.tsx index 39f38073..2a6e4de3 100644 --- a/src/app/components/editor/Editor.tsx +++ b/src/app/components/editor/Editor.tsx @@ -8,8 +8,10 @@ import React, { } from 'react'; import { Box, Scroll, Text } from 'folds'; import { + DecoratedRange, Descendant, Editor, + NodeEntry, createEditor, Element as SlateElement, Text as SlateText, @@ -122,8 +124,8 @@ export const CustomEditor = forwardRef( const renderLeaf = useCallback((props: RenderLeafProps) => , []); const decorate = useCallback( - ([node, path]: [any, number[]]) => { - const ranges: any[] = []; + ([node, path]: NodeEntry) => { + const ranges: (DecoratedRange & { pendingCommand?: boolean })[] = []; // Only decorate text nodes in the first paragraph if (path.length === 2 && path[0] === 0 && path[1] === 0 && SlateText.isText(node)) { diff --git a/src/app/components/message/content/FileContent.tsx b/src/app/components/message/content/FileContent.tsx index 9225a6a0..288def1e 100644 --- a/src/app/components/message/content/FileContent.tsx +++ b/src/app/components/message/content/FileContent.tsx @@ -119,7 +119,7 @@ export function ReadTextFile({ body, mimeType, url, encInfo, renderViewer }: Rea evt.stopPropagation()} + onContextMenu={(evt) => evt.stopPropagation()} > {renderViewer({ name: body, @@ -213,7 +213,7 @@ export function ReadPdfFile({ body, mimeType, url, encInfo, renderViewer }: Read evt.stopPropagation()} + onContextMenu={(evt) => evt.stopPropagation()} > {renderViewer({ name: body, diff --git a/src/app/components/remove-inaccessible-prompt/RemoveInaccessiblePrompt.tsx b/src/app/components/remove-inaccessible-prompt/RemoveInaccessiblePrompt.tsx index 6866963f..0ea4c486 100644 --- a/src/app/components/remove-inaccessible-prompt/RemoveInaccessiblePrompt.tsx +++ b/src/app/components/remove-inaccessible-prompt/RemoveInaccessiblePrompt.tsx @@ -15,7 +15,7 @@ import { Spinner, toRem, } from 'folds'; -import { MatrixClient, MatrixError, Room } from 'matrix-js-sdk'; +import { EventType, MatrixClient, MatrixError, Room } from 'matrix-js-sdk'; import { Icon, Icons } from '../icons'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; @@ -134,7 +134,7 @@ async function removeSpaceChildrenSequentially( onProgress?.(i, total); try { - await mx.sendStateEvent(parentId, StateEvent.SpaceChild as any, {}, roomId); + await mx.sendStateEvent(parentId, EventType.SpaceChild, {}, roomId); await delay(REMOVE_DELAY_MS); } catch { // Continue removing others even if one fails diff --git a/src/app/components/title-bar/WindowControls.tsx b/src/app/components/title-bar/WindowControls.tsx index 699be670..c69819a5 100644 --- a/src/app/components/title-bar/WindowControls.tsx +++ b/src/app/components/title-bar/WindowControls.tsx @@ -49,7 +49,7 @@ export function WindowControls() { }; // Only render on desktop (when Tauri is available) - if (typeof (window as any).__TAURI__ === 'undefined') { + if (typeof window.__TAURI__ === 'undefined') { return null; } diff --git a/src/app/features/call/CallSounds.ts b/src/app/features/call/CallSounds.ts index b6dbc5a3..bb829240 100644 --- a/src/app/features/call/CallSounds.ts +++ b/src/app/features/call/CallSounds.ts @@ -27,7 +27,7 @@ const SOUND_FILES: Record = { * In dev or browser, sounds are served from public/sound/. */ async function resolveSoundBaseUrl(): Promise { - const electronAudio = (window as any).electron?.audio; + const electronAudio = window.electron?.audio; if (electronAudio?.getSoundBaseUrl) { const base: string | null = await electronAudio.getSoundBaseUrl(); if (base) return base; diff --git a/src/app/features/common-settings/general/RoomEncryption.tsx b/src/app/features/common-settings/general/RoomEncryption.tsx index 224cf6a0..1a584899 100644 --- a/src/app/features/common-settings/general/RoomEncryption.tsx +++ b/src/app/features/common-settings/general/RoomEncryption.tsx @@ -14,7 +14,7 @@ import { Text, } from 'folds'; import React, { useCallback, useState } from 'react'; -import { MatrixError } from 'matrix-js-sdk'; +import { EventType, MatrixError } from 'matrix-js-sdk'; import FocusTrap from 'focus-trap-react'; import { Icon, Icons } from '../../../components/icons'; import { SequenceCard } from '../../../components/sequence-card'; @@ -45,7 +45,7 @@ export function RoomEncryption({ permissions }: RoomEncryptionProps) { const [enableState, enable] = useAsyncCallback( useCallback(async () => { - await mx.sendStateEvent(room.roomId, StateEvent.RoomEncryption as any, { + await mx.sendStateEvent(room.roomId, EventType.RoomEncryption, { algorithm: ROOM_ENC_ALGO, }); }, [mx, room.roomId]), diff --git a/src/app/features/common-settings/general/RoomHistoryVisibility.tsx b/src/app/features/common-settings/general/RoomHistoryVisibility.tsx index d27456d6..b14a88b2 100644 --- a/src/app/features/common-settings/general/RoomHistoryVisibility.tsx +++ b/src/app/features/common-settings/general/RoomHistoryVisibility.tsx @@ -1,6 +1,6 @@ import React, { MouseEventHandler, useCallback, useMemo, useState } from 'react'; import { Button, color, config, Menu, MenuItem, PopOut, RectCords, Spinner, Text } from 'folds'; -import { HistoryVisibility, MatrixError } from 'matrix-js-sdk'; +import { EventType, HistoryVisibility, MatrixError } from 'matrix-js-sdk'; import { RoomHistoryVisibilityEventContent } from 'matrix-js-sdk/lib/types'; import FocusTrap from 'focus-trap-react'; import { Icon, Icons } from '../../../components/icons'; @@ -65,7 +65,7 @@ export function RoomHistoryVisibility({ permissions }: RoomHistoryVisibilityProp const content: RoomHistoryVisibilityEventContent = { history_visibility: visibility, }; - await mx.sendStateEvent(room.roomId, StateEvent.RoomHistoryVisibility as any, content); + await mx.sendStateEvent(room.roomId, EventType.RoomHistoryVisibility, content); }, [mx, room.roomId], ), diff --git a/src/app/features/common-settings/general/RoomJoinRules.tsx b/src/app/features/common-settings/general/RoomJoinRules.tsx index 76ff51c9..d2121b0f 100644 --- a/src/app/features/common-settings/general/RoomJoinRules.tsx +++ b/src/app/features/common-settings/general/RoomJoinRules.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo } from 'react'; import { color, Text } from 'folds'; -import { JoinRule, MatrixError, RestrictedAllowType } from 'matrix-js-sdk'; +import { EventType, JoinRule, MatrixError, RestrictedAllowType } from 'matrix-js-sdk'; import { RoomJoinRulesEventContent } from 'matrix-js-sdk/lib/types'; import { useAtomValue } from 'jotai'; import { @@ -113,7 +113,7 @@ export function RoomJoinRules({ permissions }: RoomJoinRulesProps) { join_rule: joinRule as JoinRule, }; if (allow.length > 0) c.allow = allow; - await mx.sendStateEvent(room.roomId, StateEvent.RoomJoinRules as any, c); + await mx.sendStateEvent(room.roomId, EventType.RoomJoinRules, c); }, [mx, room, space, subspaces, roomIdToParents], ), diff --git a/src/app/features/common-settings/permissions/PermissionGroups.tsx b/src/app/features/common-settings/permissions/PermissionGroups.tsx index 3de093d4..99ccdb8d 100644 --- a/src/app/features/common-settings/permissions/PermissionGroups.tsx +++ b/src/app/features/common-settings/permissions/PermissionGroups.tsx @@ -1,6 +1,7 @@ /* eslint-disable react/no-array-index-key */ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Badge, Box, Button, Chip, config, Menu, Spinner, Text } from 'folds'; +import { EventType } from 'matrix-js-sdk'; import { produce } from 'immer'; import { Icon, Icons } from '../../../components/icons'; import { SequenceCard } from '../../../components/sequence-card'; @@ -16,7 +17,6 @@ import { PermissionGroup } from './types'; import { getPowerLevelTag, getPowers, usePowerLevelTags } from '../../../hooks/usePowerLevelTags'; import { useRoom } from '../../../hooks/useRoom'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; -import { StateEvent } from '../../../../types/matrix/room'; import { PowerSwitcher } from '../../../components/power'; import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback'; import { useAlive } from '../../../hooks/useAlive'; @@ -86,7 +86,7 @@ export function PermissionGroups({ return draftPowerLevels; }); - await mx.sendStateEvent(room.roomId, StateEvent.RoomPowerLevels as any, editedPowerLevels); + await mx.sendStateEvent(room.roomId, EventType.RoomPowerLevels, editedPowerLevels); }, [mx, room, powerLevels, permissionUpdate, permissionGroups]), ); diff --git a/src/app/features/lobby/HierarchyItemMenu.tsx b/src/app/features/lobby/HierarchyItemMenu.tsx index 3001c10a..abb45e77 100644 --- a/src/app/features/lobby/HierarchyItemMenu.tsx +++ b/src/app/features/lobby/HierarchyItemMenu.tsx @@ -13,10 +13,11 @@ import { Spinner, toRem, } from 'folds'; +import { EventType } from 'matrix-js-sdk'; import { Icon, Icons } from '../../components/icons'; import { HierarchyItem } from '../../hooks/useSpaceHierarchy'; import { useMatrixClient } from '../../hooks/useMatrixClient'; -import { MSpaceChildContent, StateEvent } from '../../../types/matrix/room'; +import { MSpaceChildContent } from '../../../types/matrix/room'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { UseStateProvider } from '../../components/UseStateProvider'; import { LeaveSpacePrompt } from '../../components/leave-space-prompt'; @@ -47,7 +48,7 @@ function SuggestMenuItem({ const [toggleState, handleToggleSuggested] = useAsyncCallback( useCallback(() => { const newContent: MSpaceChildContent = { ...content, suggested: !content.suggested }; - return mx.sendStateEvent(parentId, StateEvent.SpaceChild as any, newContent, roomId); + return mx.sendStateEvent(parentId, EventType.SpaceChild, newContent, roomId); }, [mx, parentId, roomId, content]), ); @@ -84,7 +85,7 @@ function RemoveMenuItem({ const [removeState, handleRemove] = useAsyncCallback( useCallback( - () => mx.sendStateEvent(parentId, StateEvent.SpaceChild as any, {}, roomId), + () => mx.sendStateEvent(parentId, EventType.SpaceChild, {}, roomId), [mx, parentId, roomId], ), ); diff --git a/src/app/features/room/RoomTombstone.tsx b/src/app/features/room/RoomTombstone.tsx index 94773563..ce0360dd 100644 --- a/src/app/features/room/RoomTombstone.tsx +++ b/src/app/features/room/RoomTombstone.tsx @@ -36,7 +36,9 @@ export function RoomTombstone({ roomId, body, replacementRoomId }: RoomTombstone {body || 'This room has been replaced and is no longer active.'} {joinState.status === AsyncStatus.Error && ( - {(joinState.error as any)?.message ?? 'Failed to join replacement room!'} + {joinState.error instanceof Error + ? joinState.error.message + : 'Failed to join replacement room!'} )} diff --git a/src/app/features/room/message/Reactions.tsx b/src/app/features/room/message/Reactions.tsx index fbb4b7b2..1f5f8a9c 100644 --- a/src/app/features/room/message/Reactions.tsx +++ b/src/app/features/room/message/Reactions.tsx @@ -97,7 +97,7 @@ export const Reactions = as<'div', ReactionsProps>( })} {reactions.length > 0 && ( { + onContextMenu={(evt) => { evt.stopPropagation(); }} open={!!viewer} diff --git a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx index 9acf269c..70f1607b 100644 --- a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx +++ b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx @@ -1,6 +1,6 @@ /* eslint-disable react/destructuring-assignment */ import React, { forwardRef, MouseEventHandler, useCallback, useMemo, useRef } from 'react'; -import { MatrixEvent, Room } from 'matrix-js-sdk'; +import { EventType, MatrixEvent, Room } from 'matrix-js-sdk'; import { RoomPinnedEventsEventContent } from 'matrix-js-sdk/lib/types'; import { Avatar, @@ -123,7 +123,7 @@ function PinnedMessage({ pinned: content.pinned.filter((id) => id !== eventId), }; - return mx.sendStateEvent(room.roomId, StateEvent.RoomPinnedEvents as any, newContent); + return mx.sendStateEvent(room.roomId, EventType.RoomPinnedEvents, newContent); }, [room, eventId, mx]), ); diff --git a/src/app/features/settings/account/Profile.tsx b/src/app/features/settings/account/Profile.tsx index 2f17bc97..8b6f1e8d 100644 --- a/src/app/features/settings/account/Profile.tsx +++ b/src/app/features/settings/account/Profile.tsx @@ -366,8 +366,8 @@ function ProfileBanner() { handleRemoveUpload(); // Sync user object to propagate changes throughout app await syncUserAvatar(); - } catch (e: any) { - const errorMsg = e?.message || 'Unknown error'; + } catch (e) { + const errorMsg = e instanceof Error ? e.message : 'Unknown error'; console.error('[ProfileBanner] setUserBanner failed:', e); setError(`Failed to save banner: ${errorMsg}`); } @@ -391,8 +391,8 @@ function ProfileBanner() { } setAvatarFile(undefined); await syncUserAvatar(); - } catch (e: any) { - setError(`Failed to save avatar: ${e?.message || 'Unknown error'}`); + } catch (e) { + setError(`Failed to save avatar: ${e instanceof Error ? e.message : 'Unknown error'}`); } setSaving(false); }, diff --git a/src/app/pages/auth/login/loginUtil.ts b/src/app/pages/auth/login/loginUtil.ts index 3941a139..0d310371 100644 --- a/src/app/pages/auth/login/loginUtil.ts +++ b/src/app/pages/auth/login/loginUtil.ts @@ -15,6 +15,7 @@ import { getLocalStorageItem, setLocalStorageItem, } from '../../../state/utils/atomWithLocalStorage'; +import { Sessions } from '../../../state/sessions'; export enum GetBaseUrlError { NotAllow = 'NotAllow', @@ -120,7 +121,7 @@ export const useLoginComplete = (data?: CustomLoginResponse) => { const { response: loginRes, baseUrl: loginBaseUrl } = data; // Add session to sessions list - const sessions = getLocalStorageItem('matrixSessions', []); + const sessions = getLocalStorageItem('matrixSessions', []); const newSession = { baseUrl: loginBaseUrl, @@ -134,7 +135,7 @@ export const useLoginComplete = (data?: CustomLoginResponse) => { // Check if session already exists (by userId AND deviceId to avoid conflicts) const existingIndex = sessions.findIndex( - (s: any) => s.userId === loginRes.user_id && s.deviceId === loginRes.device_id, + (s) => s.userId === loginRes.user_id && s.deviceId === loginRes.device_id, ); if (existingIndex >= 0) { // Preserve fallbackSdkStores if it was set, but never enable it for new logins diff --git a/src/app/pages/client/space/Space.tsx b/src/app/pages/client/space/Space.tsx index 191615c9..6c2ca562 100644 --- a/src/app/pages/client/space/Space.tsx +++ b/src/app/pages/client/space/Space.tsx @@ -274,7 +274,9 @@ export function SpaceTombstone({ roomId, replacementRoomId }: SpaceTombstoneProp This space has been replaced and is no longer active. {joinState.status === AsyncStatus.Error && ( - {(joinState.error as any)?.message ?? 'Failed to join replacement space!'} + {joinState.error instanceof Error + ? joinState.error.message + : 'Failed to join replacement space!'} )} diff --git a/src/app/utils/common.ts b/src/app/utils/common.ts index 05411281..d6c739c1 100644 --- a/src/app/utils/common.ts +++ b/src/app/utils/common.ts @@ -57,7 +57,7 @@ export const promiseFulfilledResult = ( if (settledResult.status === 'fulfilled') return settledResult.value; return undefined; }; -export const promiseRejectedResult = (settledResult: PromiseSettledResult): any => { +export const promiseRejectedResult = (settledResult: PromiseSettledResult): unknown => { if (settledResult.status === 'rejected') return settledResult.reason; return undefined; }; diff --git a/src/app/utils/matrix-uia.ts b/src/app/utils/matrix-uia.ts index b46cea6d..5b2829d3 100644 --- a/src/app/utils/matrix-uia.ts +++ b/src/app/utils/matrix-uia.ts @@ -72,7 +72,7 @@ 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; + const langToPolicy = terms.policies.privacy_policy as Record; const url = langToPolicy.en?.url; if (typeof url === 'string') return url; diff --git a/src/app/utils/matrix.ts b/src/app/utils/matrix.ts index 64b625aa..48ffab34 100644 --- a/src/app/utils/matrix.ts +++ b/src/app/utils/matrix.ts @@ -165,9 +165,10 @@ export const uploadContent = async ( const mxc = data.content_uri; if (mxc) onSuccess(mxc); else onError(new MatrixError(data)); - } catch (e: any) { - const error = typeof e?.message === 'string' ? e.message : undefined; - const errcode = typeof e?.name === 'string' ? e.message : undefined; + } catch (e) { + const err = e as { message?: string; name?: string }; + const error = typeof err?.message === 'string' ? err.message : undefined; + const errcode = typeof err?.name === 'string' ? err.message : undefined; onError(new MatrixError({ error, errcode })); } }; diff --git a/src/app/utils/room.ts b/src/app/utils/room.ts index 0b303649..1c648eb2 100644 --- a/src/app/utils/room.ts +++ b/src/app/utils/room.ts @@ -1,4 +1,5 @@ import { + AccountDataEvents, EventTimeline, EventTimelineSet, EventType, @@ -52,7 +53,7 @@ export const getStateEvents = (room: Room, eventType: StateEvent): MatrixEvent[] export const getAccountData = ( mx: MatrixClient, eventType: AccountDataEvent, -): MatrixEvent | undefined => mx.getAccountData(eventType as any); +): MatrixEvent | undefined => mx.getAccountData(eventType as keyof AccountDataEvents); export const getMDirects = (mDirectEvent: MatrixEvent): Set => { const roomIds = new Set(); diff --git a/src/client/initMatrix.ts b/src/client/initMatrix.ts index cde3ee5e..3aa0ff17 100644 --- a/src/client/initMatrix.ts +++ b/src/client/initMatrix.ts @@ -118,9 +118,9 @@ const getAllIndexedDBNames = async (): Promise => { }, 2000); }); - const databasesPromise = (globalThis.indexedDB as any) + const databasesPromise = globalThis.indexedDB .databases() - .then((dbs: any[]) => dbs.map((db: any) => db.name).filter(Boolean)); + .then((dbs) => dbs.map((db) => db.name).filter((name) => typeof name === 'string')); return await Promise.race([databasesPromise, timeoutPromise]); } diff --git a/src/ext.d.ts b/src/ext.d.ts index 56543ee5..c5a81418 100644 --- a/src/ext.d.ts +++ b/src/ext.d.ts @@ -49,6 +49,7 @@ interface ElectronAPI { }; audio?: { playNotificationSound: (soundType?: string) => Promise<{ success: boolean; error?: string }>; + getSoundBaseUrl?: () => Promise; }; clipboard?: { writeText: (text: string) => void;