Skip to content

Commit 703767a

Browse files
committedMar 15, 2019
tslint update + fixed new ts lint issues
1 parent cf55965 commit 703767a

File tree

6 files changed

+328
-231
lines changed

6 files changed

+328
-231
lines changed
 

‎package-lock.json

+316-220
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
"mocha": "^5.0.4",
7474
"mochawesome": "^3.0.2",
7575
"nyc": "11.7.2",
76-
"ts-node": "^5.0.1",
77-
"tslint": "^5.9.1",
78-
"typescript": "^2.7.2",
76+
"ts-node": "8.0.3",
77+
"tslint": "5.14.0",
78+
"typescript": "3.3.3333",
7979
"webpack": "^4.29.6",
8080
"webpack-cli": "2.1.1",
81-
"yargs": "^11.0.0"
81+
"yargs": "13.2.2"
8282
},
8383
"dependencies": {
8484
"http-server": "^0.11.1"

‎test/ts/algorithms/graph/breadth-first-search.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import 'mocha';
22
import { expect } from 'chai';
3-
import { BFS, breadthFirstSearch, Graph, Stack } from '../../../../src/ts/index';
3+
import { BFS, breadthFirstSearch, Graph } from '../../../../src/ts';
44

55
describe('Breadth First Search', () => {
66

7-
let count;
7+
let count: number;
88
const vertices = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'];
99
let graph: Graph;
1010

@@ -32,7 +32,7 @@ describe('Breadth First Search', () => {
3232
breadthFirstSearch(graph, vertices[0], assertCallback);
3333
});
3434

35-
function assertCallback(value) {
35+
function assertCallback(value: string) {
3636
expect(value).to.equal(vertices[count]);
3737
count++;
3838
}

‎test/ts/algorithms/graph/depth-first-search.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { expect } from 'chai';
33
import { DFS, depthFirstSearch, Graph } from '../../../../src/ts/index';
44

55
describe('Depth First Search', () => {
6-
let count;
6+
let count: number;
77
const vertices = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'];
88
const dfsCallBack = ['A', 'B', 'E', 'I', 'F', 'C', 'D', 'G', 'H'];
99
let graph: Graph;
@@ -32,7 +32,7 @@ describe('Depth First Search', () => {
3232
depthFirstSearch(graph, assertCallback);
3333
});
3434

35-
function assertCallback(value) {
35+
function assertCallback(value: string) {
3636
expect(value).to.equal(dfsCallBack[count]);
3737
count++;
3838
}

‎test/ts/algorithms/math/primality-test.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Primality Tests', () => {
1616
testIsPrime(isPrime2);
1717
});
1818

19-
function testIsPrime(primeFunction) {
19+
function testIsPrime(primeFunction: Function) {
2020
expect(primeFunction(-1)).to.equal(false);
2121
expect(primeFunction(0)).to.equal(false);
2222
expect(primeFunction(1)).to.equal(false);

‎test/ts/data-structures/red-black-tree.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Colors } from './../../../src/ts/data-structures/models/red-black-node'
22
import 'mocha';
33
import { expect } from 'chai';
44
import { RedBlackTree } from '../../../src/ts/index';
5+
import { RedBlackNode } from '../../../src/ts/data-structures/models/red-black-node';
56

67
describe('RedBlackTree', () => {
78
let tree: RedBlackTree<number>;
@@ -105,7 +106,7 @@ describe('RedBlackTree', () => {
105106

106107
});
107108

108-
function assertNode(node, key, color) {
109+
function assertNode(node: RedBlackNode<number>, key: number, color: Colors) {
109110
expect(node.color).to.equal(color);
110111
expect(node.key).to.equal(key);
111112
}

0 commit comments

Comments
 (0)
Please sign in to comment.