File tree Expand file tree Collapse file tree
extensions/typescript/src/features Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export default class BufferSyncSupport {
153153 private readonly disposables : Disposable [ ] = [ ] ;
154154 private readonly syncedBuffers : SyncedBufferMap ;
155155
156- private pendingDiagnostics = new Map < string , number > ( ) ;
156+ private readonly pendingDiagnostics = new Map < string , number > ( ) ;
157157 private readonly diagnosticDelayer : Delayer < any > ;
158158
159159 constructor (
@@ -271,16 +271,9 @@ export default class BufferSyncSupport {
271271 if ( ! this . _validate ) {
272272 return ;
273273 }
274- let files = Array . from ( this . pendingDiagnostics . entries ( ) ) . map ( ( [ key , value ] ) => {
275- return {
276- file : key ,
277- time : value
278- } ;
279- } ) . sort ( ( a , b ) => {
280- return a . time - b . time ;
281- } ) . map ( ( value ) => {
282- return value . file ;
283- } ) ;
274+ const files = Array . from ( this . pendingDiagnostics . entries ( ) )
275+ . sort ( ( a , b ) => a [ 1 ] - b [ 1 ] )
276+ . map ( entry => entry [ 0 ] ) ;
284277
285278 // Add all open TS buffers to the geterr request. They might be visible
286279 for ( const file of this . syncedBuffers . allResources ) {
You can’t perform that action at this time.
0 commit comments