I really like how Facebook's Hack has a local file system monitor which incrementally compiles on file changes. I haven't used it yet, but it sounds like a nearly ideal compromise.
As far as I can tell, the language would also support a non-validating mode that would be more or less instantaneous (the transformations it performs are all local, and none of them involve knowledge of the types involved).
interface Person {
firstname: string;
lastname: string;
}
function greeter(person: Person) {
return 'Hello, ' + person.firstname + ' ' + person.lastname;
}
var user = {firstname: 'John', lastname: 'Doe'}
document.body.innerHTML = greeter(user);
It's a shame really, because it looks like a really cool project.This. at least the js one. Maybe VS is bundled with a Typescript compiler written in C# , i dont know,but clearly the javascript one is damn slow.
I know when Palantir was developing Eclipse tools for TypeScript they posted to the Codeplex project regarding performance issues and the team from MS responded with suggestions about caching and only recompiling the minimal targets necessary.
Although it's more of a patch. A proper IDE for JS would be neat, but it'd need to support popular DI frameworks and the like.
I've not yet ported my Angular apps to Typescript but I'm very much itching to do so.
Misspelled magic strings, which were replaced with enumerations.
We also had a number of bugs with unexpected type use - like a function which expected a boolean but was given a string, or even more common number/string failures.
The type system just catches so many defects, and they're of the kind that are hard and boring to find (typos).
Plus IntelliSense integration (including jsdoc) is great.
On the downside, our project takes some time to compile so we had to build a tool to do it incrementally. Plus it doesn't play well with one-class-per-file structures (but I expect that to be fixed).