You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-04 03:22:43 +03:00
Make more of the codebase conform to strict types (#10859)
This commit is contained in:
committed by
GitHub
parent
6f58dd49e3
commit
f758cbd38a
@@ -666,7 +666,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
private onRoomTimeline = (
|
||||
ev: MatrixEvent,
|
||||
room: Room | undefined,
|
||||
toStartOfTimeline: boolean,
|
||||
toStartOfTimeline: boolean | undefined,
|
||||
removed: boolean,
|
||||
data: IRoomTimelineData,
|
||||
): void => {
|
||||
@@ -769,7 +769,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
});
|
||||
};
|
||||
|
||||
private onRoomTimelineReset = (room: Room, timelineSet: EventTimelineSet): void => {
|
||||
private onRoomTimelineReset = (room: Room | undefined, timelineSet: EventTimelineSet): void => {
|
||||
if (timelineSet !== this.props.timelineSet) return;
|
||||
|
||||
if (this.canResetTimeline()) {
|
||||
@@ -873,7 +873,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
||||
private onLocalEchoUpdated = (ev: MatrixEvent, room: Room, oldEventId: string): void => {
|
||||
private onLocalEchoUpdated = (ev: MatrixEvent, room: Room, oldEventId?: string): void => {
|
||||
if (this.unmounted) return;
|
||||
|
||||
// ignore events for other rooms
|
||||
@@ -921,7 +921,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
||||
private onSync = (clientSyncState: SyncState, prevState: SyncState, data: object): void => {
|
||||
private onSync = (clientSyncState: SyncState, prevState: SyncState | null, data?: object): void => {
|
||||
if (this.unmounted) return;
|
||||
this.setState({ clientSyncState });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user