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

This commit is contained in:
Michael Telatynski 2023-05-12 09:49:37 +01:00 committed by GitHub
parent 6f58dd49e3
commit f758cbd38a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 111 additions and 105 deletions

View file

@ -17,7 +17,7 @@ limitations under the License.
import classNames from "classnames";
import { IEventRelation } from "matrix-js-sdk/src/models/event";
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
import React, { createContext, MouseEventHandler, ReactElement, ReactNode, useContext, useRef } from "react";
import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
@ -40,6 +40,7 @@ import { chromeFileInputFix } from "../../../utils/BrowserWorkarounds";
import IconizedContextMenu, { IconizedContextMenuOptionList } from "../context_menus/IconizedContextMenu";
import { EmojiButton } from "./EmojiButton";
import { useSettingValue } from "../../../hooks/useSettings";
import { ButtonEvent } from "../elements/AccessibleButton";
interface IProps {
addEmoji: (emoji: string) => boolean;
@ -362,7 +363,7 @@ function showLocationButton(props: IProps, room: Room, matrixClient: MatrixClien
interface WysiwygToggleButtonProps {
isRichTextEnabled: boolean;
onClick: MouseEventHandler<HTMLDivElement>;
onClick: (ev: ButtonEvent) => void;
}
function ComposerModeButton({ isRichTextEnabled, onClick }: WysiwygToggleButtonProps): JSX.Element {