Skip to content

Commit 7bf5879

Browse files
author
Benjamin Pasero
committed
tslint input for microsoft#37212
1 parent 3fbbfab commit 7bf5879

51 files changed

Lines changed: 43 additions & 307 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/vs/base/browser/ui/findinput/findInput.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ export class FindInput extends Widget {
268268
placeholder: this.placeholder || '',
269269
ariaLabel: this.label || '',
270270
validationOptions: {
271-
validation: this.validation || null,
272-
showMessage: true
271+
validation: this.validation || null
273272
},
274273
inputBackground: this.inputBackground,
275274
inputForeground: this.inputForeground,

src/vs/base/browser/ui/inputbox/inputBox.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export interface IMessage {
5454

5555
export interface IInputValidationOptions {
5656
validation: IInputValidator;
57-
showMessage?: boolean;
5857
}
5958

6059
export enum MessageType {
@@ -90,8 +89,6 @@ export class InputBox extends Widget {
9089
private placeholder: string;
9190
private ariaLabel: string;
9291
private validation: IInputValidator;
93-
// @ts-ignore unused property
94-
private showValidationMessage: boolean;
9592
private state = 'idle';
9693
private cachedHeight: number;
9794

@@ -136,7 +133,6 @@ export class InputBox extends Widget {
136133

137134
if (this.options.validationOptions) {
138135
this.validation = this.options.validationOptions.validation;
139-
this.showValidationMessage = this.options.validationOptions.showMessage || false;
140136
}
141137

142138
this.element = dom.append(container, $('.monaco-inputbox.idle'));
@@ -498,7 +494,6 @@ export class InputBox extends Widget {
498494
this.placeholder = null;
499495
this.ariaLabel = null;
500496
this.validation = null;
501-
this.showValidationMessage = null;
502497
this.state = null;
503498
this.actionbar = null;
504499

src/vs/base/browser/ui/progressbar/progressbar.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ export class ProgressBar {
4040
private toUnbind: IDisposable[];
4141
private workedVal: number;
4242
private element: Builder;
43-
// @ts-ignore unused property
44-
private animationRunning: boolean;
4543
private bit: HTMLElement;
4644
private totalWork: number;
4745
private animationStopToken: ValueCallback;
@@ -65,11 +63,6 @@ export class ProgressBar {
6563

6664
builder.div({ 'class': css_progress_bit }).on([DOM.EventType.ANIMATION_START, DOM.EventType.ANIMATION_END, DOM.EventType.ANIMATION_ITERATION], (e: Event) => {
6765
switch (e.type) {
68-
case DOM.EventType.ANIMATION_START:
69-
case DOM.EventType.ANIMATION_END:
70-
this.animationRunning = e.type === DOM.EventType.ANIMATION_START;
71-
break;
72-
7366
case DOM.EventType.ANIMATION_ITERATION:
7467
if (this.animationStopToken) {
7568
this.animationStopToken(null);

src/vs/base/browser/ui/sash/sash.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export enum Orientation {
5151
export class Sash extends EventEmitter {
5252

5353
private $e: Builder;
54-
// @ts-ignore unused property
5554
private gesture: Gesture;
5655
private layoutProvider: ISashLayoutProvider;
5756
private isDisabled: boolean;
@@ -141,10 +140,6 @@ export class Sash extends EventEmitter {
141140

142141
let $window = $(window);
143142
let containerCSSClass = `${this.getOrientation()}-cursor-container${isMacintosh ? '-mac' : ''}`;
144-
// @ts-ignore unused local
145-
let lastCurrentX = startX;
146-
// @ts-ignore unused local
147-
let lastCurrentY = startY;
148143

149144
$window.on('mousemove', (e) => {
150145
DOM.EventHelper.stop(e, false);
@@ -157,9 +152,6 @@ export class Sash extends EventEmitter {
157152
currentY: mouseMoveEvent.posy
158153
};
159154

160-
lastCurrentX = mouseMoveEvent.posx;
161-
lastCurrentY = mouseMoveEvent.posy;
162-
163155
this.emit('change', event);
164156
}).once('mouseup', (e) => {
165157
DOM.EventHelper.stop(e, false);
@@ -193,11 +185,6 @@ export class Sash extends EventEmitter {
193185
currentY: startY
194186
});
195187

196-
// @ts-ignore unused local
197-
let lastCurrentX = startX;
198-
// @ts-ignore unused local
199-
let lastCurrentY = startY;
200-
201188
listeners.push(DOM.addDisposableListener(this.$e.getHTMLElement(), EventType.Change, (event: GestureEvent) => {
202189
if (types.isNumber(event.pageX) && types.isNumber(event.pageY)) {
203190
this.emit('change', {
@@ -206,9 +193,6 @@ export class Sash extends EventEmitter {
206193
startY: startY,
207194
currentY: event.pageY
208195
});
209-
210-
lastCurrentX = event.pageX;
211-
lastCurrentY = event.pageY;
212196
}
213197
}));
214198

@@ -282,6 +266,11 @@ export class Sash extends EventEmitter {
282266
this.$e = null;
283267
}
284268

269+
if (this.gesture) {
270+
this.gesture.dispose();
271+
this.gesture = null;
272+
}
273+
285274
super.dispose();
286275
}
287276
}

src/vs/base/browser/ui/selectBox/selectBox.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export class SelectBox extends Widget {
3636
private selectElement: HTMLSelectElement;
3737
private options: string[];
3838
private selected: number;
39-
// @ts-ignore unused property
40-
private container: HTMLElement;
4139
private _onDidSelect: Emitter<ISelectData>;
4240
private toDispose: IDisposable[];
4341
private selectBackground: Color;
@@ -114,7 +112,6 @@ export class SelectBox extends Widget {
114112
}
115113

116114
public render(container: HTMLElement): void {
117-
this.container = container;
118115
dom.addClass(container, 'select-container');
119116
container.appendChild(this.selectElement);
120117
this.setOptions(this.options, this.selected);

src/vs/base/common/async.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,7 @@ export class Queue<T> extends Limiter<T> {
510510
* A helper to organize queues per resource. The ResourceQueue makes sure to manage queues per resource
511511
* by disposing them once the queue is empty.
512512
*/
513-
// @ts-ignore unused generic parameter
514-
export class ResourceQueue<T> {
513+
export class ResourceQueue {
515514
private queues: { [path: string]: Queue<void> };
516515

517516
constructor() {

src/vs/base/parts/quickopen/common/quickOpenScorer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ export function scoreItem<T>(item: T, query: IPreparedQuery, fuzzy: boolean, acc
352352
return itemScore;
353353
}
354354

355-
// @ts-ignore unused generic parameter
356-
function doScoreItem<T>(label: string, description: string, path: string, query: IPreparedQuery, fuzzy: boolean): IItemScore {
355+
function doScoreItem(label: string, description: string, path: string, query: IPreparedQuery, fuzzy: boolean): IItemScore {
357356

358357
// 1.) treat identity matches on full path highest
359358
if (path && isEqual(query.value, path, true)) {

src/vs/code/electron-main/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ export class CodeApplication {
7676
@ILogService private logService: ILogService,
7777
@IEnvironmentService private environmentService: IEnvironmentService,
7878
@ILifecycleService private lifecycleService: ILifecycleService,
79-
// @ts-ignore unused injected service
80-
@IConfigurationService private configurationService: ConfigurationService,
79+
@IConfigurationService configurationService: ConfigurationService,
8180
@IStorageService private storageService: IStorageService,
8281
@IHistoryMainService private historyService: IHistoryMainService
8382
) {

src/vs/code/electron-main/menus.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { mnemonicMenuLabel as baseMnemonicLabel, unmnemonicLabel, getPathLabel }
2222
import { KeybindingsResolver } from 'vs/code/electron-main/keyboard';
2323
import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/windows/electron-main/windows';
2424
import { IHistoryMainService } from 'vs/platform/history/common/history';
25-
import { IWorkspaceIdentifier, IWorkspacesMainService, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
25+
import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
2626

2727
interface IExtensionViewlet {
2828
id: string;
@@ -71,9 +71,7 @@ export class CodeMenu {
7171
@IWindowsMainService private windowsService: IWindowsMainService,
7272
@IEnvironmentService private environmentService: IEnvironmentService,
7373
@ITelemetryService private telemetryService: ITelemetryService,
74-
@IHistoryMainService private historyService: IHistoryMainService,
75-
// @ts-ignore unused injected service
76-
@IWorkspacesMainService private workspacesService: IWorkspacesMainService
74+
@IHistoryMainService private historyService: IHistoryMainService
7775
) {
7876
this.extensionViewlets = [];
7977
this.nativeTabMenuItems = [];

src/vs/code/electron-main/windows.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ export class WindowsManager implements IWindowsMainService {
143143
@IEnvironmentService private environmentService: IEnvironmentService,
144144
@ILifecycleService private lifecycleService: ILifecycleService,
145145
@IBackupMainService private backupService: IBackupMainService,
146-
// @ts-ignore unused injected service
147-
@ITelemetryService private telemetryService: ITelemetryService,
146+
@ITelemetryService telemetryService: ITelemetryService,
148147
@IConfigurationService private configurationService: IConfigurationService,
149148
@IHistoryMainService private historyService: IHistoryMainService,
150149
@IWorkspacesMainService private workspacesService: IWorkspacesMainService,
@@ -153,7 +152,7 @@ export class WindowsManager implements IWindowsMainService {
153152
this.windowsState = this.storageService.getItem<IWindowsState>(WindowsManager.windowsStateStorageKey) || { openedWindows: [] };
154153

155154
this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this);
156-
this.workspacesManager = new WorkspacesManager(workspacesService, lifecycleService, backupService, environmentService, this);
155+
this.workspacesManager = new WorkspacesManager(workspacesService, backupService, environmentService, this);
157156

158157
this.migrateLegacyWindowState();
159158
}
@@ -1673,8 +1672,6 @@ class WorkspacesManager {
16731672

16741673
constructor(
16751674
private workspacesService: IWorkspacesMainService,
1676-
// @ts-ignore unused injected service
1677-
private lifecycleService: ILifecycleService,
16781675
private backupService: IBackupMainService,
16791676
private environmentService: IEnvironmentService,
16801677
private windowsMainService: IWindowsMainService

0 commit comments

Comments
 (0)