Just following the simplest Typescript tutorial and when it comes to typing a function parameter I'm failing.
function greeter(person: string) {
return "Hello " + person;
}
var user = "Jack";
document.body.innerHTML = greeter(user);
But when I load the page I'm getting "Unexpected token :" - the browser is trying to parse Javascript? I get that Tyescript will compile down to JS, but I'm missing something here.
I'm using Visual Studio 2013, with jQuery.d.ts to type it.
The .ts is going through TypeScriptCompile for its build action.
Body for the .aspx looks like this:
<div>
<script src="Scripts/Main.ts"></script>
</div>