Skip to content

Commit c8a655a

Browse files
committed
TypeScript 2.0.2も出たしもろもろの依存関係を更新 本文などの修正はまだ
microsoft/TypeScript#10624 microsoft/TypeScript#10625
1 parent 3f17b67 commit c8a655a

File tree

9 files changed

+16
-38
lines changed

9 files changed

+16
-38
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/kmuto/review.git
3-
revision: 2a20a0904a6380ff44af77ee1224f4035af62ea3
3+
revision: eb6845763b8875b89af997277abd0c158f8092b9
44
specs:
55
review (2.0.0)
66
rubyzip

articles/definition-file.re

+2-12
Original file line numberDiff line numberDiff line change
@@ -811,22 +811,12 @@ class Cat extends Animal {
811811
let cat: Cat = new Cat();
812812
console.log(cat.speak());
813813

814-
// ECMAScript 2015だと次のような文すら書けるのでまぁできて然るべきだった
815-
let cat2: Cat = new class extends class {
816-
speak() {
817-
return "???";
818-
}
819-
} {
820-
speak() {
821-
return "meow";
822-
}
823-
}();
824-
console.log(cat2.speak());
825-
826814
export { }
827815
#@end
828816
//}
829817

818+
#@# TODO https://github.com/Microsoft/TypeScript/issues/10624 の結果次第で削ったコードを復活させる
819+
830820
#@# OK REVIEW lc: s/以下のような分/以下のような文/
831821

832822
==={pretty-good-overload} オーバーロードを上手く使おう!

articles/index.re

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ C87版から上手に味わいを引き継いだ可愛い表紙をありがと
3838

3939
本書で利用しているTypeScriptコンパイラは次のものです。
4040
#@mapoutput(../node_modules/.bin/tsc -v | sed -e "s/\n//")
41-
Version 2.0.0
41+
Version 2.0.2
4242
#@end
4343

4444
//footnote[js-primer][@<href>{https://github.com/asciidwango/js-primer}]

articles/prepared-to-typescript.re

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $ npm install -g typescript
1717
# 省略
1818
$ tsc -v
1919
#@mapoutput(../node_modules/.bin/tsc -v)
20-
Version 2.0.0
20+
Version 2.0.2
2121
#@end
2222
$ echo "class Sample {}" > sample.ts
2323
$ tsc sample.ts
@@ -55,7 +55,7 @@ package.json
5555
$ npm install --save-dev typescript
5656
$ ./node_modules/.bin/tsc -v
5757
#@mapoutput(../node_modules/.bin/tsc -v)
58-
Version 2.0.0
58+
Version 2.0.2
5959
#@end
6060
//}
6161

@@ -71,7 +71,7 @@ $ npm bin
7171
$PWD/node_modules/.bin 的なパスが表示される
7272
$ $(npm bin)/tsc -v
7373
#@mapoutput(../node_modules/.bin/tsc -v)
74-
Version 2.0.0
74+
Version 2.0.2
7575
#@end
7676
//}
7777

articles/types-advanced.re

+2-2
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,8 @@ export { }
11491149
//list[localType/basic.ts][ローカル型を試す]{
11501150
#@mapfile(../code/types-advanced/localType/basic.ts)
11511151
{
1152-
type Data = string | boolean;
1153-
let obj: Data = true;
1152+
type Data = string | number;
1153+
let obj: Data = 1;
11541154

11551155
console.log(obj);
11561156
}

articles/typescript-basic.re

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ class Animal {
330330
// error TS2511: Cannot create an instance of the abstract class 'Animal'.
331331
// new Animal();
332332
class Cat extends Animal {
333-
constructor(...args) {
334-
super(...args);
333+
constructor() {
334+
super(...arguments);
335335
// プロパティの実装を強制される
336336
this.name = "Cat";
337337
this.poo = "poo...";

code/definition-file/declareClass/stretch.ts

-12
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,4 @@ class Cat extends Animal {
3232
let cat: Cat = new Cat();
3333
console.log(cat.speak());
3434

35-
// ECMAScript 2015だと次のような文すら書けるのでまぁできて然るべきだった
36-
let cat2: Cat = new class extends class {
37-
speak() {
38-
return "???";
39-
}
40-
} {
41-
speak() {
42-
return "meow";
43-
}
44-
}();
45-
console.log(cat2.speak());
46-
4735
export { }

code/types-advanced/localType/basic.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
type Data = string | boolean;
3-
let obj: Data = true;
2+
type Data = string | number;
3+
let obj: Data = 1;
44

55
console.log(obj);
66
}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dependencies": {},
2121
"devDependencies": {
2222
"@types/mocha": "^2.2.28",
23-
"@types/node": "^4.0.30",
23+
"@types/node": "^6.0.38",
2424
"@types/power-assert": "^0.0.27",
2525
"grunt": "^1.0.1",
2626
"grunt-cli": "^1.2.0",
@@ -32,7 +32,7 @@
3232
"load-grunt-tasks": "^3.5.0",
3333
"node-sass": "^3.8.0",
3434
"tslint": "^3.13.0",
35-
"typescript": "^2.0.0",
36-
"typescript-formatter": "^2.3.0"
35+
"typescript": "^2.0.2",
36+
"typescript-formatter": "^3.0.0"
3737
}
3838
}

0 commit comments

Comments
 (0)