@@ -23,7 +23,7 @@ const SEARCH_KEYS = [
2323] as const ;
2424
2525interface SearchIndex {
26- fuses : Record < string , Fuse < DashboardItem > > ;
26+ fuses : Record < string , Fuse < DashboardItem , any > > ;
2727 weights : Record < string , number > ;
2828 items : DashboardItem [ ] ;
2929}
@@ -34,7 +34,7 @@ const buildSearchIndex = (dashboard: any, activeTeam: string): SearchIndex => {
3434 const folders : DashboardItem [ ] = ( dashboard . allCollections || [ ] )
3535 . map ( ( c : Collection ) => ( {
3636 ...c ,
37- title : c . name ,
37+ title : c . path ,
3838 } ) )
3939 . filter ( f => f . title ) ;
4040
@@ -49,13 +49,13 @@ const buildSearchIndex = (dashboard: any, activeTeam: string): SearchIndex => {
4949 const items = [ ...sandboxes , ...folders , ...repos ] ;
5050
5151 // build a Fuse instance per key
52- const fuses : Record < string , Fuse < DashboardItem > > = { } ;
52+ const fuses : Record < string , Fuse < DashboardItem , any > > = { } ;
5353 const weights : Record < string , number > = { } ;
5454
5555 for ( const { name, threshold, weight } of SEARCH_KEYS ) {
5656 fuses [ name ] = new Fuse ( items , {
5757 keys : [ name ] ,
58- threshold : threshold ,
58+ threshold,
5959 distance : 1000 ,
6060 } ) ;
6161 weights [ name ] = weight ;
@@ -74,7 +74,7 @@ const mergeSearchResults = (
7474 for ( const key of Object . keys ( index . fuses ) ) {
7575 const fuse = index . fuses [ key ] ;
7676 for ( const item of fuse . search ( query ) ) {
77- hits . push ( item ) ;
77+ hits . push ( item as DashboardItem ) ;
7878 }
7979 }
8080
0 commit comments