Microsoft Announces TypeScript 3.0 (neowin.net)
Microsoft released version 3.0 of TypeScript, which Microsoft describes as an "extension" of JavaScript "that aims to bring static types to modern JavaScript." Quoting Microsoft's Developer Tools blog:
The TypeScript compiler reads in TypeScript code, which has things like type declarations and type annotations, and emits clean readable JavaScript with those constructs transformed and removed. That code runs in any ECMAScript runtime like your favorite browsers and Node.js. At its core, this experience means analyzing your code to catch things like bugs and typos before your users run into them; but it brings more than that. Thanks to all that information and analysis TypeScript can provide a better authoring experience, providing code completion and navigation features like Find all References, Go to Definition, and Rename in your favorite editor.
Neowin reports: With any major version release, it is not unexpected for breaking changes to be introduced and that's certainly the case for TypeScript 3.0. One obvious change is that with "unknown" becoming a new type, it is now a reserved type name and can no longer be used in type declarations. Otherwise, there's a range of API breaking changes due to a number of functions and internal methods being deprecated or being made internal.
On the plus side, TypeScript 3.0 reportedly has improved error messages, along with project references that let TypeScript projects have dependencies on other TypeScript projects.
Neowin reports: With any major version release, it is not unexpected for breaking changes to be introduced and that's certainly the case for TypeScript 3.0. One obvious change is that with "unknown" becoming a new type, it is now a reserved type name and can no longer be used in type declarations. Otherwise, there's a range of API breaking changes due to a number of functions and internal methods being deprecated or being made internal.
On the plus side, TypeScript 3.0 reportedly has improved error messages, along with project references that let TypeScript projects have dependencies on other TypeScript projects.
... we should be looking for a better replacement. JavaScript is one of those languages that became far too popular for the wrong reasons.
" emits clean readable JavaScript"
;)
Just my 2 cents
Er, I do not get it, if at the end of the day it ends up as regular javascript that means there cannot be a speed boost of any kind. It does not reduce bug rates of any sort. Other than some programmers who get very angry about javascripts nimble weak type this does not seem to...well to do anything at all really, it just introduces syntax where there was none previously but nothing is being done of any significance. How is that a benefit other than for syntactophiles getting their rocks off about a pretend strong typing that speeds along at the speed of...regular javascript?
... another programming language. [smh]
CUR ALLOC 20195.....5804M
I actually happen to like and appreciate Typescript. It was easy to learn-by-doing by going through the Angular [2-6] tutorials.
As a long-time Java programmer, I don't have to give up the type checking at the IDE level that really reduces the common coding mistakes you get with plain Javascript. You just get to tryable-then-working code faster. But you don't give up any of the flexibility that Javascript gives you. And the async/await functionality makes client-side programming just so much easier.
Does anyone else feel this way? Or is it just fashionable to hate it because Microsoft had something to do with it?
Well, hopefully someone will pull of your dick and stuff it up your nose. Because you deserve nothing less.
I have a solid 18 yeats of experience with JavaScript. There is absolutely no point to TypeScript (or similar languages like CoffeeScript). They provide some cool syntax candy and "extend" the language in a sense, but in the end it just spits out pure JavaScript and adds a level of abstraction when it comes to debugging. If you're a good JS developer, you can write excellent, readable, well-organized, and maintainable code. And with ES6 you can write truly OO code with real classes and inheritance if that's your thing. Core JS is not perfect but is very powerful if you know how to use it. I've written entire single-page apps using core JS and jQuery, complete with controllers and data models. There is nothing that TypeScript really provides or improves upon other than a syntax closer to Java, which JavaScript is not! Oh and this nonsense about code completion and refactoring is just the icing on tbe cake. Most modern IDEs can already do this and have been doing it for years FFS. Gosh even Atom with pluggins can do that.
Typescript is entirely open sourced, code and development. Check some facts before posting pure bullshit
Integer type, just to be clear. Javascript not having it is fantastically lame. How could an entire ecosystem remain so fantastically lame after so many years, so much investment in it, and so much depending on it? Makes my skin crawl.
When all you have is a hammer, every problem starts to look like a thumb.
Still no integers? Come on guys, why put all that work into it and leave that bleeding wound still bleeding? Pass.
Somebody downmodded this. Somebody who writes web software?? Lord help us.
When all you have is a hammer, every problem starts to look like a thumb.
Maybe Microsoft can get rid of JavScript . . .
"I believe in Karma. That means I can do bad things to people all day long and I assume they deserve it." : Dogbert
IMO, TypeScript is the only good thing Microsoft has ever produced (well their old corded mouse was decent). It emits readable JS, given that I don't see the risk. If they do something bad with it then I can just work off the compiled JS files.