Skip to content

Commit 58aca31

Browse files
committed
Fix implicit any errors
1 parent 03c3dc5 commit 58aca31

12 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/vs/base/common/worker/simpleWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class SimpleWorkerClient<T> extends Disposable {
244244
this._onModuleLoaded.then((availableMethods: string[]) => {
245245
let proxy = <T>{};
246246
for (let i = 0; i < availableMethods.length; i++) {
247-
proxy[availableMethods[i]] = createProxyMethod(availableMethods[i], proxyMethodRequest);
247+
(proxy as any)[availableMethods[i]] = createProxyMethod(availableMethods[i], proxyMethodRequest);
248248
}
249249
lazyProxyFulfill(proxy);
250250
}, (e) => {

src/vs/base/node/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class ConfigWatcher<T> implements IConfigWatcher<T>, IDisposable {
153153

154154
try {
155155
const watcher = extfs.watch(path, (type, file) => this.onConfigFileChange(type, file, isParentFolder));
156-
watcher.on('error', (code, signal) => this.options.onError(`Error watching ${path} for configuration changes (${code}, ${signal})`));
156+
watcher.on('error', (code: number, signal: string) => this.options.onError(`Error watching ${path} for configuration changes (${code}, ${signal})`));
157157

158158
this.disposables.push(toDisposable(() => {
159159
watcher.removeAllListeners();
@@ -209,7 +209,7 @@ export class ConfigWatcher<T> implements IConfigWatcher<T>, IDisposable {
209209
return fallback;
210210
}
211211

212-
const value = this.cache ? this.cache[key] : void 0;
212+
const value = this.cache ? (this.cache as any)[key] : void 0;
213213

214214
return typeof value !== 'undefined' ? value : fallback;
215215
}

src/vs/code/electron-browser/sharedProcessMain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function setupIPC(hook: string): TPromise<Server> {
177177

178178
function startHandshake(): TPromise<ISharedProcessInitData> {
179179
return new TPromise<ISharedProcessInitData>((c, e) => {
180-
ipcRenderer.once('handshake:hey there', (_, r) => c(r));
180+
ipcRenderer.once('handshake:hey there', (_: any, r: ISharedProcessInitData) => c(r));
181181
ipcRenderer.send('handshake:hello');
182182
});
183183
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class CodeApplication {
130130
const isValidWebviewSource = (source: string) =>
131131
!source || (URI.parse(source.toLowerCase()).toString() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString());
132132

133-
app.on('web-contents-created', (event, contents) => {
133+
app.on('web-contents-created', (_event: any, contents) => {
134134
contents.on('will-attach-webview', (event: Electron.Event, webPreferences, params) => {
135135
delete webPreferences.preload;
136136
webPreferences.nodeIntegration = false;
@@ -185,19 +185,19 @@ export class CodeApplication {
185185
this.windowsMainService.openNewWindow(OpenContext.DESKTOP); //macOS native tab "+" button
186186
});
187187

188-
ipc.on('vscode:exit', (event, code: number) => {
188+
ipc.on('vscode:exit', (_event: any, code: number) => {
189189
this.logService.log('IPC#vscode:exit', code);
190190

191191
this.dispose();
192192
this.lifecycleService.kill(code);
193193
});
194194

195-
ipc.on(machineIdIpcChannel, (event, machineId: string) => {
195+
ipc.on(machineIdIpcChannel, (_event: any, machineId: string) => {
196196
this.logService.log('IPC#vscode-machineId');
197197
this.storageService.setItem(machineIdStorageKey, machineId);
198198
});
199199

200-
ipc.on('vscode:fetchShellEnv', (event, windowId) => {
200+
ipc.on('vscode:fetchShellEnv', (_event: any, windowId: number) => {
201201
const { webContents } = BrowserWindow.fromId(windowId);
202202
getShellEnvironment().then(shellEnv => {
203203
if (!webContents.isDestroyed()) {
@@ -212,7 +212,7 @@ export class CodeApplication {
212212
});
213213
});
214214

215-
ipc.on('vscode:broadcast', (event, windowId: number, broadcast: { channel: string; payload: any; }) => {
215+
ipc.on('vscode:broadcast', (_event: any, windowId: number, broadcast: { channel: string; payload: any; }) => {
216216
if (this.windowsMainService && broadcast.channel && !isUndefinedOrNull(broadcast.payload)) {
217217
this.logService.log('IPC#vscode:broadcast', broadcast.channel, broadcast.payload);
218218

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class CodeMenu {
9999
this.windowsService.onWindowClose(() => this.updateWorkspaceMenuItems());
100100

101101
// Listen to extension viewlets
102-
ipc.on('vscode:extensionViewlets', (event, rawExtensionViewlets) => {
102+
ipc.on('vscode:extensionViewlets', (_event: any, rawExtensionViewlets: string) => {
103103
let extensionViewlets: IExtensionViewlet[] = [];
104104
try {
105105
extensionViewlets = JSON.parse(rawExtensionViewlets);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class SharedProcess implements ISharedProcess {
6565
}));
6666

6767
return new TPromise<void>((c, e) => {
68-
ipcMain.once('handshake:hello', ({ sender }) => {
68+
ipcMain.once('handshake:hello', ({ sender }: { sender: any }) => {
6969
sender.send('handshake:hey there', {
7070
sharedIPCHandle: this.environmentService.sharedIPCHandle,
7171
args: this.environmentService.args

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export class CodeWindow implements ICodeWindow {
339339
'X-Market-User-Id': this.environmentService.machineUUID
340340
};
341341

342-
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) => {
342+
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details: any, cb: any) => {
343343
cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) });
344344
});
345345

@@ -355,7 +355,7 @@ export class CodeWindow implements ICodeWindow {
355355
return callback({});
356356
});
357357

358-
this._win.webContents.session.webRequest.onHeadersReceived(null, (details, callback) => {
358+
this._win.webContents.session.webRequest.onHeadersReceived(null, (details: any, callback: any) => {
359359
const contentType: string[] = (details.responseHeaders['content-type'] || details.responseHeaders['Content-Type']) as any;
360360
if (contentType && Array.isArray(contentType) && contentType.some(x => x.toLowerCase().indexOf('image/svg') >= 0)) {
361361
return callback({ cancel: true });

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class WindowsManager implements IWindowsMainService {
201201
});
202202

203203
// React to workbench loaded events from windows
204-
ipc.on('vscode:workbenchLoaded', (event, windowId: number) => {
204+
ipc.on('vscode:workbenchLoaded', (_event: any, windowId: number) => {
205205
this.logService.log('IPC#vscode-workbenchLoaded');
206206

207207
const win = this.getWindowById(windowId);

src/vs/editor/editor.main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (typeof global.Promise === 'undefined') {
3838
let base = createMonacoBaseAPI();
3939
for (let prop in base) {
4040
if (base.hasOwnProperty(prop)) {
41-
exports[prop] = base[prop];
41+
exports[prop] = (base as any)[prop];
4242
}
4343
}
4444
exports.editor = createMonacoEditorAPI();

src/vs/workbench/browser/composite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export abstract class CompositeDescriptor<T extends Composite> {
234234
public name: string;
235235
public cssClass: string;
236236
public order: number;
237-
public keybindingId;
237+
public keybindingId: string;
238238

239239
private ctor: IConstructorSignature0<T>;
240240

0 commit comments

Comments
 (0)