@@ -147,7 +147,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
147147 private static _readModelOptions ( config : IRawConfig , isForSimpleWidget : boolean ) : ITextModelCreationOptions {
148148 let tabSize = EDITOR_MODEL_DEFAULTS . tabSize ;
149149 if ( config . editor && typeof config . editor . tabSize !== 'undefined' ) {
150- let parsedTabSize = parseInt ( config . editor . tabSize , 10 ) ;
150+ const parsedTabSize = parseInt ( config . editor . tabSize , 10 ) ;
151151 if ( ! isNaN ( parsedTabSize ) ) {
152152 tabSize = parsedTabSize ;
153153 }
@@ -158,7 +158,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
158158
159159 let indentSize = tabSize ;
160160 if ( config . editor && typeof config . editor . indentSize !== 'undefined' && config . editor . indentSize !== 'tabSize' ) {
161- let parsedIndentSize = parseInt ( config . editor . indentSize , 10 ) ;
161+ const parsedIndentSize = parseInt ( config . editor . indentSize , 10 ) ;
162162 if ( ! isNaN ( parsedIndentSize ) ) {
163163 indentSize = parsedIndentSize ;
164164 }
@@ -230,14 +230,14 @@ export class ModelServiceImpl extends Disposable implements IModelService {
230230 }
231231
232232 private _updateModelOptions ( ) : void {
233- let oldOptionsByLanguageAndResource = this . _modelCreationOptionsByLanguageAndResource ;
233+ const oldOptionsByLanguageAndResource = this . _modelCreationOptionsByLanguageAndResource ;
234234 this . _modelCreationOptionsByLanguageAndResource = Object . create ( null ) ;
235235
236236 // Update options on all models
237- let keys = Object . keys ( this . _models ) ;
237+ const keys = Object . keys ( this . _models ) ;
238238 for ( let i = 0 , len = keys . length ; i < len ; i ++ ) {
239- let modelId = keys [ i ] ;
240- let modelData = this . _models [ modelId ] ;
239+ const modelId = keys [ i ] ;
240+ const modelData = this . _models [ modelId ] ;
241241 const language = modelData . model . getLanguageIdentifier ( ) . language ;
242242 const uri = modelData . model . uri ;
243243 const oldOptions = oldOptionsByLanguageAndResource [ language + uri ] ;
@@ -360,7 +360,8 @@ export class ModelServiceImpl extends Disposable implements IModelService {
360360
361361 const commonSuffix = this . _commonSuffix ( model , modelLineCount - commonPrefix , commonPrefix , textBuffer , textBufferLineCount - commonPrefix , commonPrefix ) ;
362362
363- let oldRange : Range , newRange : Range ;
363+ let oldRange : Range ;
364+ let newRange : Range ;
364365 if ( commonSuffix > 0 ) {
365366 oldRange = new Range ( commonPrefix + 1 , 1 , modelLineCount - commonSuffix + 1 , 1 ) ;
366367 newRange = new Range ( commonPrefix + 1 , 1 , textBufferLineCount - commonSuffix + 1 , 1 ) ;
@@ -394,7 +395,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
394395 if ( ! languageSelection ) {
395396 return ;
396397 }
397- let modelData = this . _models [ MODEL_ID ( model . uri ) ] ;
398+ const modelData = this . _models [ MODEL_ID ( model . uri ) ] ;
398399 if ( ! modelData ) {
399400 return ;
400401 }
@@ -403,28 +404,28 @@ export class ModelServiceImpl extends Disposable implements IModelService {
403404
404405 public destroyModel ( resource : URI ) : void {
405406 // We need to support that not all models get disposed through this service (i.e. model.dispose() should work!)
406- let modelData = this . _models [ MODEL_ID ( resource ) ] ;
407+ const modelData = this . _models [ MODEL_ID ( resource ) ] ;
407408 if ( ! modelData ) {
408409 return ;
409410 }
410411 modelData . model . dispose ( ) ;
411412 }
412413
413414 public getModels ( ) : ITextModel [ ] {
414- let ret : ITextModel [ ] = [ ] ;
415+ const ret : ITextModel [ ] = [ ] ;
415416
416- let keys = Object . keys ( this . _models ) ;
417+ const keys = Object . keys ( this . _models ) ;
417418 for ( let i = 0 , len = keys . length ; i < len ; i ++ ) {
418- let modelId = keys [ i ] ;
419+ const modelId = keys [ i ] ;
419420 ret . push ( this . _models [ modelId ] . model ) ;
420421 }
421422
422423 return ret ;
423424 }
424425
425426 public getModel ( resource : URI ) : ITextModel | null {
426- let modelId = MODEL_ID ( resource ) ;
427- let modelData = this . _models [ modelId ] ;
427+ const modelId = MODEL_ID ( resource ) ;
428+ const modelData = this . _models [ modelId ] ;
428429 if ( ! modelData ) {
429430 return null ;
430431 }
@@ -434,8 +435,8 @@ export class ModelServiceImpl extends Disposable implements IModelService {
434435 // --- end IModelService
435436
436437 private _onWillDispose ( model : ITextModel ) : void {
437- let modelId = MODEL_ID ( model . uri ) ;
438- let modelData = this . _models [ modelId ] ;
438+ const modelId = MODEL_ID ( model . uri ) ;
439+ const modelData = this . _models [ modelId ] ;
439440
440441 delete this . _models [ modelId ] ;
441442 modelData . dispose ( ) ;
@@ -498,7 +499,7 @@ class SemanticColoringFeature extends Disposable {
498499 } ) ) ;
499500 this . _configurationService . onDidChangeConfiguration ( e => {
500501 if ( e . affectsConfiguration ( SemanticColoringFeature . SETTING_ID ) ) {
501- for ( let model of modelService . getModels ( ) ) {
502+ for ( const model of modelService . getModels ( ) ) {
502503 const curr = this . _watchers [ model . uri . toString ( ) ] ;
503504 if ( isSemanticColoringEnabled ( model ) ) {
504505 if ( ! curr ) {
0 commit comments