Skip to content

Instantly share code, notes, and snippets.

@thebeebs
Created February 12, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thebeebs/8964006 to your computer and use it in GitHub Desktop.
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.
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