Skip to content

Commit

Permalink
Finish noImplicitAny
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Puszkiewicz committed Apr 6, 2018
1 parent f701593 commit 8803b80
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 469 deletions.
10 changes: 2 additions & 8 deletions src/observers/BaseChannelObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/

import * as vscode from '../vscodeAdapter';
import { ViewColumn } from "../vscodeAdapter";
import { BaseEvent } from '../omnisharp/loggingEvents';

export abstract class BaseChannelObserver {
Expand All @@ -14,13 +13,8 @@ export abstract class BaseChannelObserver {

abstract post: (event: BaseEvent) => void;

public showChannel(preserveFocusOrColumn?: boolean | ViewColumn, preserveFocus?: boolean) {
if (typeof(preserveFocusOrColumn) === "boolean") {
this.channel.show(preserveFocusOrColumn as boolean);
}
else {
this.channel.show(preserveFocusOrColumn as ViewColumn, preserveFocus);
}
public showChannel(preserveFocusOrColumn?: boolean) {
this.channel.show(preserveFocusOrColumn as boolean);
}

public clearChannel() {
Expand Down
3 changes: 1 addition & 2 deletions src/observers/OmnisharpChannelObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as vscode from '../vscodeAdapter';
import { BaseChannelObserver } from "./BaseChannelObserver";
import { BaseEvent, CommandShowOutput, OmnisharpFailure } from '../omnisharp/loggingEvents';

Expand All @@ -12,7 +11,7 @@ export class OmnisharpChannelObserver extends BaseChannelObserver {
public post = (event: BaseEvent) => {
switch (event.constructor.name) {
case CommandShowOutput.name:
this.showChannel(vscode.ViewColumn.Three);
this.showChannel();
break;
case OmnisharpFailure.name:
this.showChannel();
Expand Down
10 changes: 0 additions & 10 deletions src/vscodeAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ export interface OutputChannel {
*/
show(preserveFocus?: boolean): void;

/**
* ~~Reveal this channel in the UI.~~
*
* @deprecated Use the overload with just one parameter (`show(preserveFocus?: boolean): void`).
*
* @param column This argument is **deprecated** and will be ignored.
* @param preserveFocus When `true` the channel will not take focus.
*/
show(column?: ViewColumn, preserveFocus?: boolean): void;

/**
* Hide this channel from the UI.
*/
Expand Down
3 changes: 2 additions & 1 deletion tasks/offlinePackagingTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { getPackageJSON } from '../tasks/packageJson';
import { Logger } from '../src/logger';
import { PackageManager } from '../src/packages';
import { PlatformInformation } from '../src/platform';
import { Result } from 'async-child-process';

gulp.task('vsix:offline:package', () => {
del.sync(vscodeignorePath);
Expand Down Expand Up @@ -57,7 +58,7 @@ function doPackageOffline() {
new PlatformInformation('linux', 'x86_64')
];

let promise = Promise.resolve();
let promise: Promise<Result> = Promise.resolve<Result>(null);

packages.forEach(platformInfo => {
promise = promise
Expand Down
5 changes: 0 additions & 5 deletions tasks/onlinePackagingTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ gulp.task('vsix:release:package', (onError) => {

fs.copyFileSync(onlineVscodeignorePath, vscodeignorePath);

let onDone = (reason) => {

onError(reason);
};

return spawnNode([vscePath, 'package'])
.then(() => {
del(vscodeignorePath);
Expand Down
12 changes: 0 additions & 12 deletions test/unitTests/logging/OmnisharpChannelObserver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,4 @@ suite("OmnisharpChannelObserver", () => {
observer.post(event);
expect(hasShown).to.be.true;
});

test('CommandShowOutput: Shows the channel', () => {
let event = new CommandShowOutput();
let testColumn: vscode.ViewColumn;
let observer = new OmnisharpChannelObserver({
...getNullChannel(),
show: (column?: ViewColumn, preserveFocus?: boolean) => { testColumn = column;}
});

observer.post(event);
expect(testColumn).to.be.equal(vscode.ViewColumn.Three);
});
});
11 changes: 11 additions & 0 deletions typings/async-child-process.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
declare module 'async-child-process' {

import { ChildProcess } from "child_process";

export function join(childProcess: ChildProcess): Promise<Result>;

export interface Result {
code: string;
signal: string;
}
}
Loading

0 comments on commit 8803b80

Please sign in to comment.