@@ -19,6 +19,7 @@ import {
19
19
import { connect , ConnectedProps } from "react-redux" ;
20
20
import { FFLoading } from "../../basicElements/Loading" ;
21
21
import { AxiosResponse } from "axios" ;
22
+ import { ClearSelected } from "../../../background/redux/actions/filesystemTypes" ;
22
23
23
24
const mapState = ( state : SystemState ) => ( {
24
25
filesystem : {
@@ -66,7 +67,7 @@ function FileList(props: Props): ReactElement {
66
67
const setCurrentPath = props . setCurrentPath ;
67
68
const setCurrentFsItemId = props . setCurrentFsItemId ;
68
69
69
- useEffect ( ( ) => {
70
+ useEffect ( ( ) : void => {
70
71
function updateStates ( ) : void {
71
72
getFolderContents ( path )
72
73
. then ( ( response : AxiosResponse < FsEntity [ ] > ) => {
@@ -101,7 +102,7 @@ function FileList(props: Props): ReactElement {
101
102
location
102
103
] ) ;
103
104
104
- const handleSelectAllChanged = ( ) => {
105
+ const handleSelectAllChanged = ( ) : void | ClearSelected => {
105
106
if ( allAreSelected ) {
106
107
return props . clearSelected ( ) ;
107
108
}
@@ -110,15 +111,15 @@ function FileList(props: Props): ReactElement {
110
111
}
111
112
} ;
112
113
113
- function setSortingOrder ( property : keyof FsEntity ) {
114
+ function setSortingOrder ( property : keyof FsEntity ) : void {
114
115
if ( sortedBy === property ) {
115
116
return setSortIncreasing ( ! sortIncreasing ) ;
116
117
}
117
118
setSortedBy ( property ) ;
118
119
setSortIncreasing ( true ) ;
119
120
}
120
121
121
- function getSortingFunction ( property : keyof FsEntity ) {
122
+ function getSortingFunction ( property : keyof FsEntity ) : ( a : any , b : any ) => number {
122
123
switch ( property ) {
123
124
case "lastUpdatedBy" :
124
125
case "size" :
@@ -145,7 +146,7 @@ function FileList(props: Props): ReactElement {
145
146
}
146
147
}
147
148
148
- function handleSortClick ( property : keyof FsEntity ) {
149
+ function handleSortClick ( property : keyof FsEntity ) : void {
149
150
if ( ! filesAndFolders || filesAndFolders . length < 2 ) {
150
151
return ;
151
152
}
0 commit comments