Skip to content

Commit f179dc0

Browse files
committed
update typescript tests
1 parent b815887 commit f179dc0

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
(function() {
2-
this.a = 0;
3-
baz(() => this);
4-
})()
1+
class Safe {
2+
contents: string;
53

6-
function foo() {
7-
this.a = 0;
8-
baz(() => this)
4+
constructor(contents: string) {
5+
this.contents = contents;
6+
}
7+
8+
printContents() {
9+
console.log(this.contents);
10+
}
911
}
1012

1113
var foo = function() {
1214
this.a = 0;
13-
var message = "Some message text"
1415
baz(() => this);
15-
}
16+
};
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
(function() {
2-
this.a = 0;
3-
baz(() => this);
4-
})()
1+
class Safe {
2+
contents: string;
53

6-
function foo() {
7-
this.a = 0;
8-
baz(() => this)
4+
constructor(contents: string) {
5+
this.contents = contents;
6+
}
7+
8+
printContents() {
9+
console.log(this.contents);
10+
}
911
}
1012

1113
var foo = function() {
1214
this.a = 0;
13-
var message = "Some message text"
1415
baz(() => this);
15-
}
16+
};

0 commit comments

Comments
 (0)