Skip to content

Commit c1b267a

Browse files
Upgrades dependencies, adds strict null checks
1 parent 9c3627d commit c1b267a

File tree

5 files changed

+238
-146
lines changed

5 files changed

+238
-146
lines changed

build/arrayToTree.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface Item {
44
[key: string]: any;
55
}
66
export interface TreeItem {
7-
data: Item;
7+
data: Item | null;
88
children: TreeItem[];
99
}
1010
export interface Config {

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
"license": "MIT",
1010
"dependencies": {},
1111
"devDependencies": {
12-
"@types/chai": "^3.5.2",
12+
"@types/chai": "^4.0.4",
1313
"@types/mocha": "^2.2.41",
14-
"chai": "^3.5.0",
14+
"chai": "^4.1.2",
1515
"coveralls": "^2.13.1",
1616
"istanbul": "^0.4.5",
1717
"mocha": "^3.3.0",
1818
"mocha-lcov-reporter": "^1.3.0",
1919
"remap-istanbul": "^0.9.5",
2020
"tslint": "^5.2.0",
21-
"tslint-config-standard": "^5.0.2",
21+
"tslint-config-standard": "^6.0.1",
2222
"typescript": "^2.3.2",
23-
"uglify-js": "^2.8.23"
23+
"uglify-js": "^3.1.1"
2424
},
2525
"scripts": {
2626
"preversion": "yarn && npm run lint && npm run build && npm run test-and-send-cov-to-coveralls",

src/arrayToTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface Item {
55
}
66

77
export interface TreeItem {
8-
data: Item
8+
data: Item|null
99
children: TreeItem[]
1010
}
1111

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"sourceMap": true,
77
"moduleResolution": "node",
88
"outDir": "build",
9-
"declaration": true
9+
"declaration": true,
10+
"strictNullChecks": true
1011
},
1112
"exclude": [
1213
"node_modules",

0 commit comments

Comments
 (0)