Share this article
Latest news
With KB5043178 to Release Preview Channel, Microsoft advises Windows 11 users to plug in when the battery is low
Copilot in Outlook will generate personalized themes for you to customize the app
Microsoft will raise the price of its 365 Suite to include AI capabilities
Death Stranding Director’s Cut is now Xbox X|S at a huge discount
Outlook will let users create custom account icons so they can tell their accounts apart easier
Microsoft releases TypeScript 1.6 tool for Visual Studio 2015
3 min. read
Published onSeptember 17, 2015
published onSeptember 17, 2015
Share this article
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
Microsoft has announced the release ofTypeScript 1.6. For those unfamiliar with TypeScript, it is a programming language developed by Microsoft as a superset of the prolific web development language JavaScript. JavaScript powers the dynamic functionality behind every modern website on the internet, alongside HTML and CSS, which handle layout and display. TypeScript was developed to compensate for one of JavaScript’s most prominent criticisms: its lack of a type-safety and static, compile-time safeguards, which makes it cumbersome to use in large scale projects. As a superset of JavaScript, all JavaScript code is valid TypeScript code, which makes its integration with currently existing JavaScript code bases a breeze.TypeScript 1.6 can be downloaded throughVisual Studio 2015,Visual Studio 2013, onnpm, or assource.The most prominent new feature of the new 1.6 version is React/JSX support.
Designed with feedback from React experts and the React team, we’ve built full-featured support for React typing and the JSX support in React. Below, you can see TypeScript code happily coexisting with JSX syntax within a single file with the new .tsx extension. This allows React developers to intermingle HTML-like syntax with TypeScript code.Our goal was to make it feel natural to work with React/JSX and to have all the type-checking and autocomplete capabilities of TypeScript. This allows you a rich editing experience for working with React and JSX when using VS, VS Code, and Sublime.
Next up is Class Expressions, which allows developers to declare classes as though they were normal expressions. A notable use-case for this would be defining and extending anonymous classes, much in the same way Javascript allows the declaration of anonymous functions.TypeScript 1.6 also adds the ability to create user-defined type guards. In addition to standard type-checking using if statement comparisons, guard functions are succinctly declared with a return value of “value is Type”, which returns a boolean that can work with instanceof and typeof comparison checks and better facilitates compile-time checking of dynamic types.Up next is intersection types, which creates a very convenient shorthand for combining two different types via the new & operator, obviating the need to create clunky interfaces that inherited from other types.A hotly demanded feature that has finally been incorporated is abstract classes. Abstract classes function similar to interfaces, but have the added option of describing implementation details meant to be consumed directly by their inheritors.Another popular feature implemented is generic type aliases, which supplants the previous limitation of only allowing simple aliases that shortened long type names. Type aliases can now be generic, granting them full expressive capabilities.No update this big comes without the possibility of breaking compatibility with older versions. In an effort to better facilitate the objectives of TypeScript, TypeScript 1.6 now requires object literals to bematched more closely. Failure to do so will elicit compile time errors. According to the beta, this has already mitigated hundreds of potential bugs and errors.Look herefor a more comprehensive examination of potentially breaking scenarios.Finally, the TypeScript team is working on aset of improvementsto module resolution. This is currently a work in progress, and the team welcomes all community feedback to help in figuring it out.It should be stressed that the development of TypeScript is incredibly transparent and open: virtually all of TypeScripts feature implementations have been the result of exhaustive discussion between the TypeScript team and members of the developer community.So, if you’re interested in improving TypeScript to work better for you, head on over to the language’swebsiteand send them your thoughts.
Radu Tyrsina
Radu Tyrsina has been a Windows fan ever since he got his first PC, a Pentium III (a monster at that time).
For most of the kids of his age, the Internet was an amazing way to play and communicate with others, but he was deeply impressed by the flow of information and how easily you can find anything on the web.
Prior to founding Windows Report, this particular curiosity about digital content enabled him to grow a number of sites that helped hundreds of millions reach faster the answer they’re looking for.
User forum
0 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Radu Tyrsina