Skip to content

Commit bcf289f

Browse files
author
Benjamin Pasero
committed
debt - less explicit any
1 parent 521cebb commit bcf289f

28 files changed

Lines changed: 84 additions & 68 deletions

File tree

src/vs/platform/files/common/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export interface IFileService {
137137
/**
138138
* Configures the file service with the provided options.
139139
*/
140-
updateOptions(options: any): void;
140+
updateOptions(options: object): void;
141141

142142
/**
143143
* Returns the preferred encoding to use for a given resource.

src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TrimWhitespaceParticipant implements INamedSaveParticpant {
4040
// Nothing
4141
}
4242

43-
public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): any {
43+
public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): void {
4444
if (this.configurationService.lookup('files.trimTrailingWhitespace', model.textEditorModel.getLanguageIdentifier().language).value) {
4545
this.doTrimTrailingWhitespace(model.textEditorModel, env.reason === SaveReason.AUTO);
4646
}
@@ -98,7 +98,7 @@ export class FinalNewLineParticipant implements INamedSaveParticpant {
9898
// Nothing
9999
}
100100

101-
public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): any {
101+
public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): void {
102102
if (this.configurationService.lookup('files.insertFinalNewline', model.textEditorModel.getLanguageIdentifier().language).value) {
103103
this.doInsertFinalNewLine(model.textEditorModel);
104104
}
@@ -138,7 +138,7 @@ class FormatOnSaveParticipant implements INamedSaveParticpant {
138138
// Nothing
139139
}
140140

141-
participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<any> {
141+
participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<void> {
142142

143143
const model = editorModel.textEditorModel;
144144
if (env.reason === SaveReason.AUTO
@@ -204,7 +204,7 @@ class ExtHostSaveParticipant implements INamedSaveParticpant {
204204
this._proxy = threadService.get(ExtHostContext.ExtHostDocumentSaveParticipant);
205205
}
206206

207-
participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<any> {
207+
participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<void> {
208208
return new TPromise<any>((resolve, reject) => {
209209
setTimeout(reject, 1750);
210210
this._proxy.$participateInSave(editorModel.getResource(), env.reason).then(values => {
@@ -240,7 +240,7 @@ export class SaveParticipant implements ISaveParticipant {
240240
// Hook into model
241241
TextFileEditorModel.setSaveParticipant(this);
242242
}
243-
participate(model: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<any> {
243+
participate(model: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<void> {
244244

245245
const stats: { [name: string]: number } = Object.create(null);
246246

src/vs/workbench/browser/parts/activitybar/activitybarPart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
5555
private viewletIdToActionItems: { [viewletId: string]: IActionItem; };
5656
private viewletIdToActivityStack: { [viewletId: string]: IViewletActivity[]; };
5757

58-
private memento: any;
58+
private memento: object;
5959
private pinnedViewlets: string[];
6060
private activeUnpinnedViewlet: ViewletDescriptor;
6161

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
9494

9595
interface ISerializedUntitledEditorInput {
9696
resource: string;
97-
resourceJSON: any;
97+
resourceJSON: object;
9898
modeId: string;
9999
encoding: string;
100100
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
8686

8787
private dimension: Dimension;
8888
private editorGroupsControl: IEditorGroupsControl;
89-
private memento: any;
89+
private memento: object;
9090
private stacks: EditorStacksModel;
9191
private tabOptions: ITabOptions;
9292
private forceHideTabs: boolean;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ class TabActionRunner extends ActionRunner {
724724
super();
725725
}
726726

727-
public run(action: IAction, context?: any): TPromise<any> {
727+
public run(action: IAction, context?: any): TPromise<void> {
728728
const group = this.group();
729729
if (!group) {
730730
return TPromise.as(void 0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class ToggleEditorModeAction extends Action {
365365
return ToggleEditorModeAction.isInlineMode(this.editor) ? ToggleEditorModeAction.SIDEBYSIDE_LABEL : ToggleEditorModeAction.INLINE_LABEL;
366366
}
367367

368-
public run(): TPromise<any> {
368+
public run(): TPromise<boolean> {
369369
const inlineModeActive = ToggleEditorModeAction.isInlineMode(this.editor);
370370

371371
const control = this.editor.getControl();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ interface ITextEditorViewState {
3939
}
4040

4141
export interface IEditorConfiguration {
42-
editor: any;
43-
diffEditor: any;
42+
editor: object;
43+
diffEditor: object;
4444
}
4545

4646
/**

src/vs/workbench/browser/parts/sidebar/sidebarPart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class SidebarPart extends CompositePart<Viewlet> {
101101
}
102102

103103
// First check if sidebar is hidden and show if so
104-
let promise = TPromise.as<any>(null);
104+
let promise = TPromise.as<void>(null);
105105
if (!this.partService.isVisible(Parts.SIDEBAR_PART)) {
106106
try {
107107
this.blockOpeningViewlet = true;

src/vs/workbench/browser/quickopen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export class QuickOpenAction extends Action {
370370
this.enabled = !!this.quickOpenService;
371371
}
372372

373-
public run(context?: any): TPromise<any> {
373+
public run(context?: any): TPromise<void> {
374374

375375
// Show with prefix
376376
this.quickOpenService.show(this.prefix);

0 commit comments

Comments
 (0)