Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ec4f672

Browse files
committed
Improve typing
Signed-off-by: Šimon Brandner <[email protected]>
1 parent 26ae71f commit ec4f672

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/views/elements/LazyRenderList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ItemRange {
5555
}
5656
}
5757

58-
interface IProps<T extends unknown> {
58+
interface IProps<T> {
5959
// height in pixels of the component returned by `renderItem`
6060
itemHeight: number;
6161
// function to turn an element of `items` into a react component
@@ -84,13 +84,13 @@ interface IState {
8484
}
8585

8686
@replaceableComponent("views.elements.LazyRenderList")
87-
export default class LazyRenderList extends React.Component<IProps<unknown>, IState> {
87+
export default class LazyRenderList<T = any> extends React.Component<IProps<T>, IState> {
8888
public static defaultProps: Partial<IProps<unknown>> = {
8989
overflowItems: 20,
9090
overflowMargin: 5,
9191
};
9292

93-
constructor(props: IProps<unknown>) {
93+
constructor(props: IProps<T>) {
9494
super(props);
9595

9696
this.state = {

0 commit comments

Comments
 (0)