Created
February 12, 2014 20:36
-
-
Save thebeebs/8964006 to your computer and use it in GitHub Desktop.
You can state that x is a function you can describe the shape of an object so in this instance a will have a string propert called a and a b property of type number.
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
function process(x: {a: string; b: number}){ | |
return x.a.length; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment