Skip to content

Commit

Permalink
add 08-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMN committed Oct 24, 2016
1 parent 3bcce79 commit 7411791
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 08-typescript/test.js
@@ -0,0 +1,10 @@
var whatIsCool = function (word) { return (word + " is cool!"); };
var MyCoolClass = (function () {
function MyCoolClass() {
this.isCool = true;
this.isPurple = 'maybe';
}
return MyCoolClass;
}());
var coolPhrase = whatIsCool('TypeScript');
console.log(coolPhrase);
15 changes: 15 additions & 0 deletions 08-typescript/test.ts
@@ -0,0 +1,15 @@
var whatIsCool = word => `${word} is cool!`;

class MyCoolClass {
isCool;
isPurple;
constructor() {
this.isCool = true;
this.isPurple = 'maybe';
}

}

var coolPhrase = whatIsCool('TypeScript');

console.log(coolPhrase);
9 changes: 9 additions & 0 deletions 08-typescript/test01.js
@@ -0,0 +1,9 @@
var test2 = (function () {
function test2() {
this.hello = 'hello';
}
test2.prototype.say = function () {
return this.hello;
};
return test2;
}());
8 changes: 8 additions & 0 deletions 08-typescript/test01.ts
@@ -0,0 +1,8 @@
class test2 {
hello = 'hello'

say() {
return this.hello;
}

}
3 changes: 3 additions & 0 deletions 08-typescript/tsconfig.json
@@ -0,0 +1,3 @@
{
"compileOnSave": true
}

0 comments on commit 7411791

Please sign in to comment.