From 49f7170d9591068bff30203bae82e8e52237bded Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 10 Jul 2020 18:31:53 +0200 Subject: [PATCH] extract type --- src/components/views/rooms/RoomSublist2.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index 66b5a4aad1..c219b87c92 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -86,6 +86,12 @@ interface IProps { // TODO: Account for https://github.com/vector-im/riot-web/issues/14179 } +// TODO: Use re-resizer's NumberSize when it is exposed as the type +interface ResizeDelta { + width: number, + height: number, +} + type PartialDOMRect = Pick; interface IState { @@ -161,7 +167,7 @@ export default class RoomSublist2 extends React.Component { e: MouseEvent | TouchEvent, travelDirection: Direction, refToElement: HTMLDivElement, - delta: { width: number, height: number }, // TODO: Use re-resizer's NumberSize when it is exposed as the type + delta: ResizeDelta, ) => { // Do some sanity checks, but in reality we shouldn't need these. if (travelDirection !== "bottom") return;