3 ms·
I'm not sure what you mean by the compiler fully having your back, but it is fairly helpful. It does type inference, which means you don't have to explicitly ty
by michaelwww 13y ago
I'm not sure what you mean by the compiler fully having your back, but it is fairly helpful. It does type inference, which means you don't have to explicitly type everything to get type checking help. You can do as little or as much type checking as you would like. Regular unadorned JavaScript code is TypeScript code and will compile. The compiler will tell you when not all code paths return a value, when the wrong type is passed to a function, when a return value is the wrong type, etc... It keeps track of the symbols in the source making refactoring work as you would expect. I really can't think of any downside since it's just JavaScript.
- virtualwhys 13y agoBy type inference I mean the compiler has your back ;-) If IDE support is getting to the point where you can hover-view/click-through to type, then that is really quite impressive. Will be awhile before that gets to MonoDevelop, however (Linux workstation here). For me the ideal would be a terse syntax a la coffeescript, but with static type checking. I wonder what compile times are like for large-ish TypeScript projects? Imagine it's fairly quick, but even simple static type checking will bring some overhead.
- michaelwww 13y ago> If IDE support is getting to the point where you can hover-view/click-through to type, then that is really quite impressive. Like this? http://i.imgur.com/RRFq0dl.png http://i.imgur.com/RRFq0dl.png Compile times are easily control by breaking the files up. Similar to C# partial class, they can still go in the same module. I'm using the free Visual Studio Express for Web, so I'm not sure about Mono/Linux support, but I hear there is WebStorm and Sublime Text plugin support and one I also like which is Adobe Brackets.