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

@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, { createRef, forwardRef, MouseEvent, ReactNode, RefObject, useRef } from "react";
import React, { createRef, forwardRef, MouseEvent, ReactNode, useRef } from "react";
import classNames from "classnames";
import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
@ -1437,7 +1437,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
}
// Wrap all event tiles with the tile error boundary so that any throws even during construction are captured
const SafeEventTile = forwardRef((props: EventTileProps, ref: RefObject<UnwrappedEventTile>) => {
const SafeEventTile = forwardRef<UnwrappedEventTile, EventTileProps>((props, ref) => {
return (
<>
<TileErrorBoundary mxEvent={props.mxEvent} layout={props.layout ?? Layout.Group}>