Skip to content

Commit e2d2e8f

Browse files
authored
Merge pull request YousefED#76 from YousefED/dom/ts-2.1
Typescript 2.1
2 parents 14a0b2c + 628a7ca commit e2d2e8f

File tree

9 files changed

+152
-133
lines changed

9 files changed

+152
-133
lines changed

Diff for: .travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
3-
- "4.1"
4-
- "4.0"
3+
- "4"
4+
- "7"
55
script:
66
- npm run lint
77
- npm run test

Diff for: package.json

+8-9
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,21 @@
3232
"dependencies": {
3333
"glob": "~7.1.1",
3434
"json-stable-stringify": "^1.0.1",
35-
"typescript": "~2.0.10",
36-
"yargs": "^6.4.0"
35+
"typescript": "~2.1.4",
36+
"yargs": "^6.6.0"
3737
},
3838
"devDependencies": {
39-
"@types/ajv": "0.0.4",
4039
"@types/assertion-error": "^1.0.30",
4140
"@types/chai": "^3.4.34",
4241
"@types/glob": "^5.0.30",
4342
"@types/json-stable-stringify": "^1.0.29",
44-
"@types/mocha": "^2.2.33",
45-
"@types/node": "^6.0.51",
46-
"ajv": "^4.9.0",
43+
"@types/mocha": "^2.2.37",
44+
"@types/node": "^7.0.0",
45+
"ajv": "^4.10.4",
4746
"chai": "^3.5.0",
48-
"mocha": "^3.1.2",
49-
"source-map-support": "^0.4.6",
50-
"tslint": "^4.0.2"
47+
"mocha": "^3.2.0",
48+
"source-map-support": "^0.4.8",
49+
"tslint": "^4.3.1"
5150
},
5251
"scripts": {
5352
"test": "npm run build && mocha -t 5000 --require source-map-support/register test",

Diff for: test/programs/string-literals-inline/main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
class MyObject {
22
foo: "ok" | "fail" | "abort";
3+
bar: "ok" | "fail" | "abort" | string;
34
}

Diff for: test/programs/string-literals-inline/schema.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
"fail",
99
"ok"
1010
]
11+
},
12+
"bar": {
13+
"type": "string"
1114
}
1215
},
1316
"required": [
14-
"foo"
17+
"foo",
18+
"bar"
1519
],
1620
"$schema": "http://json-schema.org/draft-04/schema#"
1721
}

Diff for: test/programs/string-literals/main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ type result = "ok" | "fail" | "abort";
22

33
class MyObject {
44
foo: result;
5+
bar: result | string;
56
}

Diff for: test/programs/string-literals/schema.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
"properties": {
44
"foo": {
55
"$ref": "#/definitions/result"
6+
},
7+
"bar": {
8+
"type": "string"
69
}
710
},
811
"required": [
9-
"foo"
12+
"foo",
13+
"bar"
1014
],
1115
"definitions": {
1216
"result": {

Diff for: test/programs/type-primitives/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class MyObject {
77

88
number1: number = 1;
99

10-
/** @type integer */
10+
/** @TJS-type integer */
1111
integer1: number = 1;
1212
integer2: integer = 1;
1313

Diff for: tslint.json

-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@
88
"curly": true,
99
"forin": true,
1010
"label-position": true,
11-
"label-undefined": true,
1211
"no-arg": true,
1312
"no-any": false,
1413
"jsdoc-format": true,
1514
"semicolon": [true, "always"],
16-
"no-duplicate-key": true,
1715
"no-duplicate-variable": true,
18-
"no-unreachable": true,
1916
"no-consecutive-blank-lines": false,
2017
"no-console": [
2118
true,
@@ -32,7 +29,6 @@
3229
"no-string-literal": false,
3330
"no-trailing-whitespace": true,
3431
"no-unused-expression": true,
35-
"no-unused-variable": true,
3632
"no-use-before-declare": true,
3733
"one-line": [
3834
true,

0 commit comments

Comments
 (0)