Skip to content

Commit 2a559e6

Browse files
author
Benjamin Pasero
committed
debt - some 💄 (no implicit any among others)
1 parent 4276d2c commit 2a559e6

41 files changed

Lines changed: 98 additions & 123 deletions

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/history.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
export interface IHistoryNavigationWidget {
77

8-
showPreviousValue();
8+
showPreviousValue(): void;
99

10-
showNextValue();
10+
showNextValue(): void;
1111

1212
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export class Grid<T extends IView> implements IDisposable {
262262
this._addView(newView, viewSize, location);
263263
}
264264

265-
protected _addView(newView: T, size: number | GridViewSizing, location): void {
265+
protected _addView(newView: T, size: number | GridViewSizing, location: number[]): void {
266266
this.views.set(newView, newView.element);
267267
this.gridview.addView(newView, size, location);
268268
}

src/vs/base/common/event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export namespace Event {
280280
const flush = (listener: (e: T) => any, thisArgs?: any) => buffer.forEach(e => listener.call(thisArgs, e));
281281

282282
const emitter = new Emitter<T>({
283-
onListenerDidAdd(emitter, listener: (e: T) => any, thisArgs?: any) {
283+
onListenerDidAdd(emitter: Emitter<T>, listener: (e: T) => any, thisArgs?: any) {
284284
if (nextTick) {
285285
setTimeout(() => flush(listener, thisArgs));
286286
} else {

src/vs/base/common/map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Iterator, IteratorResult, FIN } from './iterator';
99

1010
export function values<V = any>(set: Set<V>): V[];
1111
export function values<K = any, V = any>(map: Map<K, V>): V[];
12-
export function values<V>(forEachable: { forEach(callback: (value: V, ...more: any[]) => any) }): V[] {
12+
export function values<V>(forEachable: { forEach(callback: (value: V, ...more: any[]) => any): void }): V[] {
1313
const result: V[] = [];
1414
forEachable.forEach(value => result.push(value));
1515
return result;

src/vs/base/parts/quickopen/browser/quickOpenModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { URI } from 'vs/base/common/uri';
99
import { ITree, IActionProvider } from 'vs/base/parts/tree/browser/tree';
1010
import { IconLabel, IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel';
1111
import { IQuickNavigateConfiguration, IModel, IDataSource, IFilter, IAccessiblityProvider, IRenderer, IRunner, Mode, IEntryRunContext } from 'vs/base/parts/quickopen/common/quickOpen';
12-
import { Action, IAction, IActionRunner } from 'vs/base/common/actions';
12+
import { Action, IAction, IActionRunner, IActionItem } from 'vs/base/common/actions';
1313
import { compareAnything } from 'vs/base/common/comparers';
1414
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
1515
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
@@ -300,7 +300,7 @@ class NoActionProvider implements IActionProvider {
300300
return null;
301301
}
302302

303-
getActionItem(tree: ITree, element: any, action: Action) {
303+
getActionItem(tree: ITree, element: any, action: Action): IActionItem | null {
304304
return null;
305305
}
306306
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function doScore(query: string, queryLower: string, queryLength: number, target:
156156
return [scores[queryLength * targetLength - 1], positions.reverse()];
157157
}
158158

159-
function computeCharScore(queryCharAtIndex, queryLowerCharAtIndex, target: string, targetLower: string, targetIndex: number, matchesSequenceLength: number): number {
159+
function computeCharScore(queryCharAtIndex: string, queryLowerCharAtIndex: string, target: string, targetLower: string, targetIndex: number, matchesSequenceLength: number): number {
160160
let score = 0;
161161

162162
if (queryLowerCharAtIndex !== targetLower[targetIndex]) {

src/vs/workbench/browser/actions.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ export const Scope = {
6565
* The ContributableActionProvider leverages the actionbar contribution model to find actions.
6666
*/
6767
export class ContributableActionProvider implements IActionProvider {
68-
private registry: IActionBarRegistry;
69-
70-
constructor() {
71-
this.registry = Registry.as<IActionBarRegistry>(Extensions.Actionbar);
72-
}
68+
private readonly registry: IActionBarRegistry = Registry.as<IActionBarRegistry>(Extensions.Actionbar);
7369

7470
private toContext(tree: ITree, element: any): any {
7571
return {
@@ -242,8 +238,8 @@ export interface IActionBarRegistry {
242238
}
243239

244240
class ActionBarRegistry implements IActionBarRegistry {
245-
private actionBarContributorConstructors: { scope: string; ctor: IConstructorSignature0<ActionBarContributor>; }[] = [];
246-
private actionBarContributorInstances: { [scope: string]: ActionBarContributor[] } = Object.create(null);
241+
private readonly actionBarContributorConstructors: { scope: string; ctor: IConstructorSignature0<ActionBarContributor>; }[] = [];
242+
private readonly actionBarContributorInstances: { [scope: string]: ActionBarContributor[] } = Object.create(null);
247243
private instantiationService: IInstantiationService;
248244

249245
start(accessor: ServicesAccessor): void {

src/vs/workbench/browser/editor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ class EditorRegistry implements IEditorRegistry {
172172
this.editors = editorsToSet;
173173
}
174174

175-
getEditorInputs(): any[] {
176-
const inputClasses: any[] = [];
175+
getEditorInputs(): SyncDescriptor<EditorInput>[] {
176+
const inputClasses: SyncDescriptor<EditorInput>[] = [];
177177
for (const editor of this.editors) {
178-
const editorInputDescriptors = <SyncDescriptor<EditorInput>[]>editor[INPUT_DESCRIPTORS_PROPERTY];
178+
const editorInputDescriptors = editor[INPUT_DESCRIPTORS_PROPERTY];
179179
inputClasses.push(...editorInputDescriptors.map(descriptor => descriptor.ctor));
180180
}
181181

src/vs/workbench/browser/panel.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,15 @@ export class PanelRegistry extends CompositeRegistry<Panel> {
7575
*/
7676
export abstract class TogglePanelAction extends Action {
7777

78-
private panelId: string;
79-
8078
constructor(
8179
id: string,
8280
label: string,
83-
panelId: string,
81+
private readonly panelId: string,
8482
protected panelService: IPanelService,
8583
private layoutService: IWorkbenchLayoutService,
8684
cssClass?: string
8785
) {
8886
super(id, label, cssClass);
89-
this.panelId = panelId;
9087
}
9188

9289
run(): Promise<any> {

src/vs/workbench/browser/part.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export abstract class Part extends Component implements ISerializableView {
6868
this.titleArea = this.createTitleArea(parent, options);
6969
this.contentArea = this.createContentArea(parent, options);
7070

71-
this.partLayout = new PartLayout(this.parent, this.options, this.titleArea, this.contentArea);
71+
this.partLayout = new PartLayout(this.options, this.contentArea);
7272

7373
this.updateStyles();
7474
}
@@ -137,7 +137,7 @@ class PartLayout {
137137

138138
private static readonly TITLE_HEIGHT = 35;
139139

140-
constructor(container: HTMLElement, private options: IPartOptions, titleArea: HTMLElement | null, private contentArea: HTMLElement | null) { }
140+
constructor(private options: IPartOptions, private contentArea: HTMLElement | null) { }
141141

142142
layout(width: number, height: number): ILayoutContentResult {
143143

0 commit comments

Comments
 (0)