Skip to content

Instantly share code, notes, and snippets.

@thebeebs
Created February 12, 2014 21:16
Show Gist options
  • Save thebeebs/8964673 to your computer and use it in GitHub Desktop.
Save thebeebs/8964673 to your computer and use it in GitHub Desktop.
If we introduce a property (c) but then do not provide it when we initialise the process function. We will encouter a complie time error.
interface Thing {
a: number;
b: string;
c: boolean;
}
function process(x: Thing){
return x.a;
}
var n = process({a: 10, b:'Beeby'});
n.toFixed(0.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment