Apply strictNullChecks
to src/components/views/rooms/*
(#10875)
* fix everything except notificationbadge * unit test ThirdPartyMemberInfo * fix RoomPreviewBar dm tests * lint * test PinnedEventTile
This commit is contained in:
parent
08c0f332b3
commit
74d30187a4
13 changed files with 326 additions and 17 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
|
||||
import React from "react";
|
||||
import classNames from "classnames";
|
||||
import { Resizable } from "re-resizable";
|
||||
import { Resizable, Size } from "re-resizable";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { IWidget } from "matrix-widget-api";
|
||||
|
||||
|
@ -124,7 +124,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
|
|||
Container.Top,
|
||||
this.topApps()
|
||||
.slice(1)
|
||||
.map((_, i) => this.resizer.forHandleAt(i).size),
|
||||
.map((_, i) => this.resizer.forHandleAt(i)!.size),
|
||||
);
|
||||
this.setState({ resizingHorizontal: false });
|
||||
},
|
||||
|
@ -339,7 +339,9 @@ const PersistentVResizer: React.FC<IPersistentResizerProps> = ({
|
|||
|
||||
return (
|
||||
<Resizable
|
||||
size={{ height: Math.min(defaultHeight, maxHeight), width: undefined }}
|
||||
// types do not support undefined height/width
|
||||
// but resizable code checks specifically for undefined on Size prop
|
||||
size={{ height: Math.min(defaultHeight, maxHeight), width: undefined } as unknown as Size}
|
||||
minHeight={minHeight}
|
||||
maxHeight={maxHeight}
|
||||
onResizeStart={() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue