@@ -139,7 +139,7 @@ export class ExtHostCell extends Disposable implements vscode.NotebookCell {
139139 }
140140
141141 set outputs ( newOutputs : vscode . CellOutput [ ] ) {
142- let rawDiffs = diff < vscode . CellOutput > ( this . _outputs || [ ] , newOutputs || [ ] , ( a ) => {
142+ const rawDiffs = diff < vscode . CellOutput > ( this . _outputs || [ ] , newOutputs || [ ] , ( a ) => {
143143 return this . _outputMapping . has ( a ) ;
144144 } ) ;
145145
@@ -374,19 +374,19 @@ export class ExtHostNotebookDocument extends Disposable implements vscode.Notebo
374374 return ;
375375 }
376376
377- let contentChangeEvents : vscode . NotebookCellsChangeData [ ] = [ ] ;
377+ const contentChangeEvents : vscode . NotebookCellsChangeData [ ] = [ ] ;
378378
379379 splices . reverse ( ) . forEach ( splice => {
380- let cellDtos = splice [ 2 ] ;
381- let newCells = cellDtos . map ( cell => {
380+ const cellDtos = splice [ 2 ] ;
381+ const newCells = cellDtos . map ( cell => {
382382
383383 const extCell = new ExtHostCell ( this . _proxy , this , this . _documentsAndEditors , cell ) ;
384384
385385 if ( ! this . _cellDisposableMapping . has ( extCell . handle ) ) {
386386 this . _cellDisposableMapping . set ( extCell . handle , new DisposableStore ( ) ) ;
387387 }
388388
389- let store = this . _cellDisposableMapping . get ( extCell . handle ) ! ;
389+ const store = this . _cellDisposableMapping . get ( extCell . handle ) ! ;
390390
391391 store . add ( extCell . onDidChangeOutputs ( ( diffs ) => {
392392 this . eventuallyUpdateCellOutputs ( extCell , diffs ) ;
@@ -475,9 +475,9 @@ export class ExtHostNotebookDocument extends Disposable implements vscode.Notebo
475475 }
476476
477477 async eventuallyUpdateCellOutputs ( cell : ExtHostCell , diffs : ISplice < IProcessedOutput > [ ] ) {
478- let renderers = new Set < number > ( ) ;
479- let outputDtos : NotebookCellOutputsSplice [ ] = diffs . map ( diff => {
480- let outputs = diff . toInsert ;
478+ const renderers = new Set < number > ( ) ;
479+ const outputDtos : NotebookCellOutputsSplice [ ] = diffs . map ( diff => {
480+ const outputs = diff . toInsert ;
481481 return [ diff . start , diff . deleteCount , outputs ] ;
482482 } ) ;
483483
@@ -528,7 +528,7 @@ export class NotebookEditorCellEditBuilder implements vscode.NotebookEditorCellE
528528 this . _throwIfFinalized ( ) ;
529529
530530 const sourceArr = Array . isArray ( content ) ? content : content . split ( / \r | \n | \r \n / g) ;
531- let cell = {
531+ const cell = {
532532 source : sourceArr ,
533533 language,
534534 cellKind : type ,
@@ -673,7 +673,7 @@ export class ExtHostNotebookEditor extends Disposable implements vscode.Notebook
673673 return Promise . resolve ( true ) ;
674674 }
675675
676- let compressedEdits : ICellEditOperation [ ] = [ ] ;
676+ const compressedEdits : ICellEditOperation [ ] = [ ] ;
677677 let compressedEditsIndex = - 1 ;
678678
679679 for ( let i = 0 ; i < editData . edits . length ; i ++ ) {
@@ -683,8 +683,8 @@ export class ExtHostNotebookEditor extends Disposable implements vscode.Notebook
683683 continue ;
684684 }
685685
686- let prevIndex = compressedEditsIndex ;
687- let prev = compressedEdits [ prevIndex ] ;
686+ const prevIndex = compressedEditsIndex ;
687+ const prev = compressedEdits [ prevIndex ] ;
688688
689689 if ( prev . editType === CellEditType . Insert && editData . edits [ i ] . editType === CellEditType . Insert ) {
690690 if ( prev . index === editData . edits [ i ] . index ) {
@@ -761,7 +761,7 @@ export class ExtHostNotebookOutputRenderer {
761761 }
762762
763763 render ( document : ExtHostNotebookDocument , output : vscode . CellDisplayOutput , outputId : string , mimeType : string ) : string {
764- let html = this . renderer . render ( document , { output, outputId, mimeType } ) ;
764+ const html = this . renderer . render ( document , { output, outputId, mimeType } ) ;
765765
766766 return html ;
767767 }
@@ -794,7 +794,7 @@ export class ExtHostNotebookKernelProviderAdapter extends Disposable {
794794
795795 const newMap = new Map < vscode . NotebookKernel , string > ( ) ;
796796 let kernel_unique_pool = 0 ;
797- let kernelIdCache = new Set < string > ( ) ;
797+ const kernelIdCache = new Set < string > ( ) ;
798798
799799 const transformedData : INotebookKernelInfoDto2 [ ] = data . map ( kernel => {
800800 let id = this . _kernelToId . get ( kernel ) ;
@@ -947,7 +947,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
947947 const documentHandle = arg . notebookEditor ?. notebookHandle ;
948948 const cellHandle = arg . cell . handle ;
949949
950- for ( let value of this . _editors ) {
950+ for ( const value of this . _editors ) {
951951 if ( value [ 1 ] . editor . document . handle === documentHandle ) {
952952 const cell = value [ 1 ] . editor . document . getCell ( cellHandle ) ;
953953 if ( cell ) {
@@ -971,7 +971,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
971971 throw new Error ( `Notebook renderer for '${ type } ' already registered` ) ;
972972 }
973973
974- let extHostRenderer = new ExtHostNotebookOutputRenderer ( type , filter , renderer ) ;
974+ const extHostRenderer = new ExtHostNotebookOutputRenderer ( type , filter , renderer ) ;
975975 this . _notebookOutputRenderers . set ( extHostRenderer . type , extHostRenderer ) ;
976976 this . _proxy . $registerNotebookRenderer ( { id : extension . identifier , location : extension . extensionLocation , description : extension . description } , type , filter , renderer . preloads || [ ] ) ;
977977 return new extHostTypes . Disposable ( ( ) => {
@@ -1053,8 +1053,8 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
10531053 }
10541054
10551055 findBestMatchedRenderer ( mimeType : string ) : ExtHostNotebookOutputRenderer [ ] {
1056- let matches : ExtHostNotebookOutputRenderer [ ] = [ ] ;
1057- for ( let renderer of this . _notebookOutputRenderers ) {
1056+ const matches : ExtHostNotebookOutputRenderer [ ] = [ ] ;
1057+ for ( const renderer of this . _notebookOutputRenderers ) {
10581058 if ( renderer [ 1 ] . matches ( mimeType ) ) {
10591059 matches . push ( renderer [ 1 ] ) ;
10601060 }
@@ -1148,7 +1148,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
11481148
11491149 async $resolveNotebookKernel ( handle : number , editorId : string , uri : UriComponents , kernelId : string , token : CancellationToken ) : Promise < void > {
11501150 await this . _withAdapter < void > ( handle , uri , async ( adapter , document ) => {
1151- let webComm = this . _webviewComm . get ( editorId ) ;
1151+ const webComm = this . _webviewComm . get ( editorId ) ;
11521152
11531153 if ( webComm ) {
11541154 await adapter . resolveNotebook ( kernelId , document , webComm . contentProviderComm , token ) ;
@@ -1263,7 +1263,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
12631263 }
12641264
12651265 async $executeNotebookByAttachedKernel ( viewType : string , uri : UriComponents , cellHandle : number | undefined ) : Promise < void > {
1266- let document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
1266+ const document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
12671267
12681268 if ( ! document ) {
12691269 return ;
@@ -1306,34 +1306,34 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
13061306
13071307 async $executeNotebookKernelFromProvider ( handle : number , uri : UriComponents , kernelId : string , cellHandle : number | undefined ) : Promise < void > {
13081308 await this . _withAdapter ( handle , uri , async ( adapter , document ) => {
1309- let cell = cellHandle !== undefined ? document . getCell ( cellHandle ) : undefined ;
1309+ const cell = cellHandle !== undefined ? document . getCell ( cellHandle ) : undefined ;
13101310
13111311 return adapter . executeNotebook ( kernelId , document , cell ) ;
13121312 } ) ;
13131313 }
13141314
13151315 async $cancelNotebookKernelFromProvider ( handle : number , uri : UriComponents , kernelId : string , cellHandle : number | undefined ) : Promise < void > {
13161316 await this . _withAdapter ( handle , uri , async ( adapter , document ) => {
1317- let cell = cellHandle !== undefined ? document . getCell ( cellHandle ) : undefined ;
1317+ const cell = cellHandle !== undefined ? document . getCell ( cellHandle ) : undefined ;
13181318
13191319 return adapter . cancelNotebook ( kernelId , document , cell ) ;
13201320 } ) ;
13211321 }
13221322
13231323 async $executeNotebook2 ( kernelId : string , viewType : string , uri : UriComponents , cellHandle : number | undefined ) : Promise < void > {
1324- let document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
1324+ const document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
13251325
13261326 if ( ! document || document . viewType !== viewType ) {
13271327 return ;
13281328 }
13291329
1330- let kernelInfo = this . _notebookKernels . get ( kernelId ) ;
1330+ const kernelInfo = this . _notebookKernels . get ( kernelId ) ;
13311331
13321332 if ( ! kernelInfo ) {
13331333 return ;
13341334 }
13351335
1336- let cell = cellHandle !== undefined ? document . getCell ( cellHandle ) : undefined ;
1336+ const cell = cellHandle !== undefined ? document . getCell ( cellHandle ) : undefined ;
13371337
13381338 if ( cell ) {
13391339 return withToken ( token => ( kernelInfo ! . kernel . executeCell as any ) ( document , cell , token ) ) ;
@@ -1343,7 +1343,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
13431343 }
13441344
13451345 async $saveNotebook ( viewType : string , uri : UriComponents , token : CancellationToken ) : Promise < boolean > {
1346- let document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
1346+ const document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
13471347 if ( ! document ) {
13481348 return false ;
13491349 }
@@ -1357,7 +1357,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
13571357 }
13581358
13591359 async $saveNotebookAs ( viewType : string , uri : UriComponents , target : UriComponents , token : CancellationToken ) : Promise < boolean > {
1360- let document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
1360+ const document = this . _documents . get ( URI . revive ( uri ) . toString ( ) ) ;
13611361 if ( ! document ) {
13621362 return false ;
13631363 }
@@ -1447,7 +1447,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
14471447 }
14481448
14491449 $acceptEditorPropertiesChanged ( uriComponents : UriComponents , data : INotebookEditorPropertiesChangeData ) : void {
1450- let editor = this . _getEditorFromURI ( uriComponents ) ;
1450+ const editor = this . _getEditorFromURI ( uriComponents ) ;
14511451
14521452 if ( ! editor ) {
14531453 return ;
@@ -1481,7 +1481,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
14811481 this . _webviewComm . set ( editorId , webComm ) ;
14821482 }
14831483
1484- let editor = new ExtHostNotebookEditor (
1484+ const editor = new ExtHostNotebookEditor (
14851485 document . viewType ,
14861486 editorId ,
14871487 revivedUri ,
@@ -1515,7 +1515,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
15151515 delta . removedDocuments . forEach ( ( uri ) => {
15161516 const revivedUri = URI . revive ( uri ) ;
15171517 const revivedUriStr = revivedUri . toString ( ) ;
1518- let document = this . _documents . get ( revivedUriStr ) ;
1518+ const document = this . _documents . get ( revivedUriStr ) ;
15191519
15201520 if ( document ) {
15211521 document . dispose ( ) ;
@@ -1547,7 +1547,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
15471547 if ( ! this . _documents . has ( revivedUriStr ) ) {
15481548 const that = this ;
15491549
1550- let document = this . _unInitializedDocuments . get ( revivedUriStr ) ?? new ExtHostNotebookDocument ( this . _proxy , this . _documentsAndEditors , {
1550+ const document = this . _unInitializedDocuments . get ( revivedUriStr ) ?? new ExtHostNotebookDocument ( this . _proxy , this . _documentsAndEditors , {
15511551 emitModelChange ( event : vscode . NotebookCellsChangeEvent ) : void {
15521552 that . _onDidChangeNotebookCells . fire ( event ) ;
15531553 } ,
0 commit comments