@@ -445,7 +445,7 @@ export class IDLIndex {
445445 // check if we have the file in our lookup
446446 if ( this . parsedCache . has ( file ) ) {
447447 const text = this . parsedCache . text ( file ) ;
448- if ( text . length > 0 ) {
448+ if ( Array . isArray ( text ) ) {
449449 return text . join ( '\n' ) ;
450450 }
451451 }
@@ -473,7 +473,7 @@ export class IDLIndex {
473473 * Check if local
474474 */
475475 case this . parsedCache . has ( file ) :
476- globals = this . parsedCache . get ( file ) . global ;
476+ globals = ( this . parsedCache . get ( file ) as IParsed ) . global ;
477477 break ;
478478
479479 default :
@@ -554,7 +554,7 @@ export class IDLIndex {
554554 IDLFileHelper . isPRODef ( file )
555555 )
556556 ) {
557- return undefined ;
557+ return [ ] ;
558558 }
559559
560560 // if we are multi threaded, then
@@ -881,14 +881,14 @@ export class IDLIndex {
881881 // post process cell
882882 await this . postProcessProFile (
883883 files [ i ] ,
884- byCell [ files [ i ] ] ,
884+ byCell [ files [ i ] ] as IParsed ,
885885 token ,
886886 [ ] ,
887887 false ,
888888 ) ;
889889
890890 // update stored token
891- this . parsedCache . add ( files [ i ] , byCell [ files [ i ] ] ) ;
891+ this . parsedCache . add ( files [ i ] , byCell [ files [ i ] ] as IParsed ) ;
892892 }
893893
894894 return byCell ;
@@ -1292,6 +1292,8 @@ export class IDLIndex {
12921292 } ,
12931293 } ) ;
12941294 }
1295+
1296+ return false ;
12951297 }
12961298
12971299 /**
@@ -1328,7 +1330,7 @@ export class IDLIndex {
13281330
13291331 try {
13301332 /** Get file from cache */
1331- const parsed = this . parsedCache . get ( files [ i ] ) ;
1333+ const parsed = this . parsedCache . get ( files [ i ] ) as IParsed ;
13321334
13331335 /** Post-process and check for global changes */
13341336 const didChange = await this . postProcessProFile (
@@ -1842,10 +1844,7 @@ export class IDLIndex {
18421844 this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . ALL_FILES , {
18431845 files,
18441846 } ) ;
1845- this . indexerPool . postToAll (
1846- LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP ,
1847- undefined ,
1848- ) ;
1847+ this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP , { } ) ;
18491848
18501849 // track that we have PRO files
18511850 if ( files . length > 0 ) {
@@ -1946,10 +1945,7 @@ export class IDLIndex {
19461945 await Promise . all ( parsing ) ;
19471946
19481947 // send message to clean up
1949- this . indexerPool . postToAll (
1950- LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP ,
1951- undefined ,
1952- ) ;
1948+ this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP , { } ) ;
19531949
19541950 /**
19551951 * Messages for global token synchronization
@@ -2008,10 +2004,7 @@ export class IDLIndex {
20082004 await Promise . all ( synchronize ) ;
20092005
20102006 // send message to clean up
2011- this . indexerPool . postToAll (
2012- LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP ,
2013- undefined ,
2014- ) ;
2007+ this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP , { } ) ;
20152008
20162009 // save stats
20172010 this . lastWorkspaceIndexStats . timePro = Math . floor ( performance . now ( ) - t0 ) ;
@@ -2084,10 +2077,7 @@ export class IDLIndex {
20842077 await Promise . all ( parsing ) ;
20852078
20862079 // send message to clean up
2087- this . indexerPool . postToAll (
2088- LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP ,
2089- undefined ,
2090- ) ;
2080+ this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP , { } ) ;
20912081
20922082 /**
20932083 * Messages for global token synchronization
@@ -2198,10 +2188,7 @@ export class IDLIndex {
21982188 await Promise . all ( postProcessing ) ;
21992189
22002190 // send message to clean up
2201- this . indexerPool . postToAll (
2202- LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP ,
2203- undefined ,
2204- ) ;
2191+ this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP , { } ) ;
22052192
22062193 /**
22072194 * Process our results
@@ -2233,10 +2220,7 @@ export class IDLIndex {
22332220 this . lastWorkspaceIndexStats . linesPro = lines ;
22342221
22352222 // send message to clean up
2236- this . indexerPool . postToAll (
2237- LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP ,
2238- undefined ,
2239- ) ;
2223+ this . indexerPool . postToAll ( LSP_WORKER_THREAD_MESSAGE_LOOKUP . CLEAN_UP , { } ) ;
22402224 }
22412225
22422226 /**
0 commit comments