chore: upgrade TypeScript 4.9 to 5.9, ESLint 8.29 to 8.57, @typescript-eslint 5 to 7
CI / Build & Quality Checks (push) Successful in 10m33s
CI / Build & Quality Checks (push) Successful in 10m33s
Resolves all TS2345/TS2347/TS7006 type errors introduced by stricter TypeScript 5.x. Fix Icons.Settings to Icons.Setting, cast account data returns, fix implicit any. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
|
||||
const submitAccountData: AccountDataSubmitCallback = useCallback(
|
||||
async (type, content) => {
|
||||
await mx.setAccountData(type, content);
|
||||
await (mx as any).setAccountData(type, content);
|
||||
},
|
||||
[mx],
|
||||
);
|
||||
@@ -34,7 +34,9 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
return (
|
||||
<AccountDataEditor
|
||||
type={accountDataType ?? undefined}
|
||||
content={accountDataType ? mx.getAccountData(accountDataType)?.getContent() : undefined}
|
||||
content={
|
||||
accountDataType ? (mx as any).getAccountData(accountDataType)?.getContent() : undefined
|
||||
}
|
||||
submitChange={submitAccountData}
|
||||
requestClose={() => setAccountDataType(undefined)}
|
||||
/>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { MatrixEvent } from 'matrix-js-sdk';
|
||||
import React, { MouseEventHandler, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Box,
|
||||
@@ -303,7 +304,9 @@ export function GlobalPacks({ onViewPack }: GlobalPacksProps) {
|
||||
const [applyState, applyChanges] = useAsyncCallback(
|
||||
useCallback(async () => {
|
||||
const content =
|
||||
mx.getAccountData(AccountDataEvent.PoniesEmoteRooms)?.getContent<EmoteRoomsContent>() ?? {};
|
||||
(
|
||||
(mx as any).getAccountData(AccountDataEvent.PoniesEmoteRooms) as MatrixEvent | undefined
|
||||
)?.getContent<EmoteRoomsContent>() ?? {};
|
||||
const updatedContent: EmoteRoomsContent = JSON.parse(JSON.stringify(content));
|
||||
|
||||
selectedPacks.forEach((addr) => {
|
||||
@@ -320,7 +323,7 @@ export function GlobalPacks({ onViewPack }: GlobalPacksProps) {
|
||||
}
|
||||
});
|
||||
|
||||
await mx.setAccountData(AccountDataEvent.PoniesEmoteRooms, updatedContent);
|
||||
await (mx as any).setAccountData(AccountDataEvent.PoniesEmoteRooms, updatedContent);
|
||||
}, [mx, selectedPacks, removedPacks]),
|
||||
);
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ export function KeywordMessagesNotifications() {
|
||||
<KeywordInput />
|
||||
</SettingTile>
|
||||
</SequenceCard>
|
||||
{keywordPushRules.map((pushRule) => (
|
||||
{keywordPushRules.map((pushRule: any) => (
|
||||
<SequenceCard
|
||||
key={pushRule.rule_id}
|
||||
className={SequenceCardStyle}
|
||||
|
||||
Reference in New Issue
Block a user