7
Integration with JavaScript
One of the most appealing facets of JavaScript development is the wealth of external JavaScript libraries that have already been published, are tried and tested, and are available for re-use. Libraries such as jQuery, Underscore, Backbone, and Moment have been around for years, are well documented, and can be used to enhance the JavaScript development experience. As we know, TypeScript generates JavaScript, so we can easily use these libraries and frameworks in TypeScript.
JavaScript is also valid TypeScript, and we can even rename a standard JavaScript file to a TypeScript file just by changing the .js
file extension to a .ts
file extension, if we were converting existing JavaScript files to TypeScript. Remember ...
Get Mastering TypeScript - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.