Currently, I am working on a presentation for my development team about TypeScript. I want to demonstrate the importance of type checking through examples, but I'm stumped as to why this particular piece of code is not throwing a compile-time error when it reaches the ".notafunction" call. Any ideas?
/// <reference path="typings/jquery/jquery.d.ts" />
function greeting(person : any) {
return "Hello " + person + "!";
}
$(document).ready(function () {
var user = ".Net Development Team";
$("#greeting-header").notafunction(greeting(user));
});