Make more of the codebase conform to strict types (#10857)

This commit is contained in:
Michael Telatynski 2023-05-16 14:25:43 +01:00 committed by GitHub
parent 7f017a84c2
commit 6a3f59cc76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 127 additions and 121 deletions

View file

@ -31,7 +31,7 @@ interface IKeyboardShortcutRowProps {
}
// Filter out the labs section if labs aren't enabled.
const visibleCategories = Object.entries(CATEGORIES).filter(
const visibleCategories = (Object.entries(CATEGORIES) as [CategoryName, ICategory][]).filter(
([categoryName]) => categoryName !== CategoryName.LABS || SdkConfig.get("show_labs_settings"),
);
@ -73,7 +73,7 @@ const KeyboardUserSettingsTab: React.FC = () => {
return (
<div className="mx_SettingsTab mx_KeyboardUserSettingsTab">
<div className="mx_SettingsTab_heading">{_t("Keyboard")}</div>
{visibleCategories.map(([categoryName, category]: [CategoryName, ICategory]) => {
{visibleCategories.map(([categoryName, category]) => {
return <KeyboardShortcutSection key={categoryName} categoryName={categoryName} category={category} />;
})}
</div>