Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
hershal committed Jul 2, 2017
1 parent cbdce6a commit 604bbb8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DispatcherStandardInputSync implements IDispatcher {
}
resolve(results);
})
.catch((error) => reject(error));
.catch((error: string) => reject(error));
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/TextOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export class Split extends TextOperation implements IStreamingOperation {
&& this.options.fields[0] !== undefined
&& !isNaN(this.options.fields[0])) {

return _(this.options.fields).map((num) => processed[num]).join(this.options.outputDelimeter);
return _(this.options.fields).map((num) => processed[num])
.join(this.options.outputDelimeter);
}
/* Otherwise return the entire string */
return _.join(processed, this.options.outputDelimeter);
Expand Down
4 changes: 2 additions & 2 deletions test/SetOperationsSpec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { IOperation } from '../src/Interfaces';
import { ISynchronousOperation } from '../src/Interfaces';
import * as SetOperations from '../src/SetOperations';

import * as chai from "chai";
const expect = chai.expect;

function checkOperation(operation: IOperation, input: string[][], expected: string[], callback: any) {
function checkOperation(operation: ISynchronousOperation, input: string[][], expected: string[], callback: any) {
operation
.run(input)
.then((results) => expect(results).to.deep.equal(expected))
Expand Down

0 comments on commit 604bbb8

Please sign in to comment.