Skip to content

Commit b2b2cb0

Browse files
author
Benjamin Pasero
committed
var => let/const
1 parent f7d23a3 commit b2b2cb0

34 files changed

Lines changed: 48 additions & 46 deletions

File tree

src/vs/workbench/api/node/extHostDocuments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export class ExtHostDocumentData extends MirrorModel2 {
292292
resultLines: string[] = [];
293293

294294
resultLines.push(this._lines[startLineIndex].substring(range.start.character));
295-
for (var i = startLineIndex + 1; i < endLineIndex; i++) {
295+
for (let i = startLineIndex + 1; i < endLineIndex; i++) {
296296
resultLines.push(this._lines[i]);
297297
}
298298
resultLines.push(this._lines[endLineIndex].substring(0, range.end.character));

src/vs/workbench/browser/parts/editor/editorActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export class FocusFirstGroupAction extends Action {
154154

155155
// Find left editor and focus it
156156
let editors = this.editorService.getVisibleEditors();
157-
for (var editor of editors) {
157+
for (let editor of editors) {
158158
if (editor.position === Position.LEFT) {
159159
this.editorGroupService.focusGroup(Position.LEFT);
160160

@@ -164,7 +164,7 @@ export class FocusFirstGroupAction extends Action {
164164

165165
// Since no editor is currently opened, try to open last history entry to the target side
166166
let history = this.historyService.getHistory();
167-
for (var input of history) {
167+
for (let input of history) {
168168

169169
// For now only support to open resources from history to the side
170170
if (!!getUntitledOrFileResource(input)) {
@@ -232,7 +232,7 @@ export abstract class BaseFocusSideGroupAction extends Action {
232232
// Otherwise try to find a history entry to open to the target editor side
233233
else if (referenceEditor) {
234234
let history = this.historyService.getHistory();
235-
for (var input of history) {
235+
for (let input of history) {
236236

237237
// For now only support to open files from history to the side
238238
if (!!getUntitledOrFileResource(input)) {

src/vs/workbench/browser/parts/editor/editorPart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,8 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
11141114
});
11151115

11161116
// Pass to instantiated editors
1117-
for (var i = 0; i < this.instantiatedEditors.length; i++) {
1118-
for (var j = 0; j < this.instantiatedEditors[i].length; j++) {
1117+
for (let i = 0; i < this.instantiatedEditors.length; i++) {
1118+
for (let j = 0; j < this.instantiatedEditors[i].length; j++) {
11191119
if (this.visibleEditors.some(editor => editor === this.instantiatedEditors[i][j])) {
11201120
continue;
11211121
}

src/vs/workbench/browser/parts/editor/titleControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export abstract class TitleControl implements ITitleAreaControl {
412412
getActions: () => TPromise.as(this.getContextMenuActions(identifier)),
413413
getActionsContext: () => identifier,
414414
getKeyBinding: (action) => {
415-
var opts = this.keybindingService.lookupKeybindings(action.id);
415+
const opts = this.keybindingService.lookupKeybindings(action.id);
416416
if (opts.length > 0) {
417417
return opts[0]; // only take the first one
418418
}

src/vs/workbench/electron-browser/integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class ElectronIntegration {
156156
getAnchor: () => target,
157157
getActions: () => TPromise.as(TextInputActions),
158158
getKeyBinding: (action) => {
159-
var opts = this.keybindingService.lookupKeybindings(action.id);
159+
const opts = this.keybindingService.lookupKeybindings(action.id);
160160
if (opts.length > 0) {
161161
return opts[0]; // only take the first one
162162
}

src/vs/workbench/electron-browser/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const timers = (<any>window).MonacoEnvironment.timers;
3131

3232
function domContentLoaded(): winjs.Promise {
3333
return new winjs.Promise((c, e) => {
34-
var readyState = document.readyState;
34+
const readyState = document.readyState;
3535
if (readyState === 'complete' || (document && document.body !== null)) {
3636
window.setImmediate(c);
3737
} else {

src/vs/workbench/parts/debug/browser/debugViewRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ class DebugViewRegistryImpl implements IDebugViewRegistry {
3434
}
3535
}
3636

37-
export var DebugViewRegistry = <IDebugViewRegistry>new DebugViewRegistryImpl();
37+
export const DebugViewRegistry = <IDebugViewRegistry>new DebugViewRegistryImpl();

src/vs/workbench/parts/debug/common/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export interface IConfigurationManager {
265265
onDidConfigurationChange: Event<string>;
266266
}
267267

268-
export var IDebugService = createDecorator<IDebugService>(DEBUG_SERVICE_ID);
268+
export const IDebugService = createDecorator<IDebugService>(DEBUG_SERVICE_ID);
269269

270270
export interface IDebugService {
271271
_serviceBrand: any;

src/vs/workbench/parts/debug/node/debugConfigurationManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { IQuickOpenService } from 'vs/workbench/services/quickopen/common/quickO
3333

3434
// debuggers extension point
3535

36-
export var debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerExtensionPoint<debug.IRawAdapter[]>('debuggers', {
36+
export const debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerExtensionPoint<debug.IRawAdapter[]>('debuggers', {
3737
description: nls.localize('vscode.extension.contributes.debuggers', 'Contributes debug adapters.'),
3838
type: 'array',
3939
defaultSnippets: [{ body: [{ type: '', extensions: [] }] }],
@@ -126,7 +126,7 @@ export var debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerExt
126126

127127
// debug general schema
128128

129-
export var schemaId = 'vscode://schemas/launch';
129+
export const schemaId = 'vscode://schemas/launch';
130130
const schema: IJSONSchema = {
131131
id: schemaId,
132132
type: 'object',

src/vs/workbench/parts/emmet/node/emmet.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ declare module 'emmet' {
146146
*/
147147
export function run(action: string, editor: Editor, arg?: string): boolean;
148148

149-
export var preferences: Preferences;
149+
export const preferences: Preferences;
150150

151-
export var profile: Profiles;
151+
export const profile: Profiles;
152152

153153
export function loadProfiles(profiles: any);
154154
}

0 commit comments

Comments
 (0)