Last active
May 21, 2017 17:21
-
-
Save semuserable/3c2b13cefa54a0fd57987c355dbd5680 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Person { | |
age: number, | |
name: string, | |
say(): string | |
} | |
let mike = { | |
age: 25, | |
name:"Mike", | |
say: function() { | |
return "My name is " + this.name + | |
" and I'm " + this.age + " years old!" | |
} | |
} | |
function sayIt(person: Person) { | |
return person.say(); | |
} | |
console.log(sayIt(mike)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment