This cheat sheet is an adjunct to our Definitive TypeScript Guide. Originally published November 2018.
Originally published October 2018. Updated March 2023. This article describes the features and functionality of TypeScript 5.0. One of the most interesting languages for large-scale application development is Microsoft’s TypeScript. TypeScript is unique in that it is a superset of JavaScript, but with optional types, interfaces, generics, and more.
Redux-Saga is an intuitive side effect manager for Redux.
A few years ago, we created a little card game that poked fun at all the ups and downs of a typical development milestone. Players can enjoy development iterations reduced to simple card draws, with each card designed to spark laughs and conversations about past project experiences.
In this article, we’re going to explore a particular type of parser that is conceptually simple, super flexible, and crazy easy to test. We’ll use these parsers to help us solve a problem that many of us have been faced with and frustrated by: parsing dates.
The benefits of TypeScript are numerous, from strong type safety, code maintenance to refactoring, and more. It’s also not uncommon today for web developers to be responsible for both the front end and the back end of a project.
Originally published November 2018. Updated November 2022.
In March 2022, a Stage 0 proposal was announced that would add TypeScript-like type annotations to the JavaScript language. The utility and ergonomics of static types for JavaScript have been debated since before TypeScript’s inception; some developers feel that types add needless complexity to the language, while others feel that types add a much-needed safety net.
We’ve talked before about some of the great features Deno brings to the table: first-class TypeScript support, a solid standard library, support for Web standards, and implicit security. All of this makes Deno great for writing scripts and servers, but it also works well for writing client-side applications.
Deno, introduced by Node.js creator Ryan Dahl during JSConf 2018, has grown into a credible alternative to Node.js, and the JavaScript and TypeScript communities have continued to track Deno’s progress. Like Node.js, Deno is a system for executing JavaScript code in various environments ( desktop, command-line, server, etc.).
Among the vast number of improvements that ES2015 brought to the JavaScript language was a powerful feature called “template literals.” Naturally, TypeScript, as a superset of JavaScript, has supported this useful construct since its beginning. However, TypeScript 4.1 introduced a novel application of the template literal concept to increase the power and usefulness of its type-system: it introduced something called a template literal type.
TypeScript has become a hugely popular alternative to JavaScript in the frontend web development community. Many engineering teams are convinced it is a critical tool that allows them to write better code faster.
Rome is a new set of tools for working with web-facing technologies like JavaScript, TypeScript, JSON, HTML, Markdown, and CSS. The toolchain currently supports linting and formatting, with active plans to also support bundling, compiling, minification, type checking, testing, and documentation generation.
The Angular Components library started its life as Angular Material, a set of Material Design components built for Angular by the Angular team. Released around the time of Angular 5, the Angular Material library consisted of some 30 material components.
CarPlay is an Apple iOS car integration standard that allows you to display content from your iPhone onto your compatible car head unit and control your phone. Common uses for this include casting music from services such as Spotify or Apple Music or for trip navigation using a map application.
The recent release of TypeScript 4.0 offers a smorgasbord of improvements including improvements to coding editor experience, build scenarios and support for variadic tuple types. Let’s take a closer look at some of these improvements a developer can make use of in this latest release.
TypeScript has become a mainstay of modern web development libraries. Consuming functions and widgets written by a third party can be error-prone without some type of guidance.
This is part 2 of the Disciplined Engineering series. It focuses on improving the confidence of the code produced by your team.
The recent TypeScript 3.9 release primarily focuses on performance and stability, but it does include some language updates that are worth a closer look. Continuing its quest to save you from yourself, TypeScript 3.9 expands on the uncalled function checks that were introduced in version 3.7.
SitePen is a huge advocate for TypeScript and the benefits of having well-typed code. TypeScript is especially powerful when used by medium and large teams that want to find ways to increase their overall confidence in their code.
React Native is a JavaScript framework for writing hybrid native mobile applications for both iOS and Android platforms. React Native uses the same JSX and React development approach you would take for developing for the browser, but applications get built as native applications in Objective-C (for iOS) or Java (for Android) by the React Native tooling.
In many ways, TypeScript is more like a powerful linting and documentation tool to author better JavaScript, rather than a separate programming language. One significant benefit of TypeScript is its deliberate support for some of the latest ECMAScript language features.
The ubiquity of JavaScript is undeniable; it’s the universal language of the web — a position that no other languages hold. JavaScript is flexible, able to adapt and grow as the web grows.
Augmented Reality (AR) brings digital information or media and interweaves it with our experience of the real world. In recent years Augmented Reality has become apparent in the consumer space in two major formats: head-mounted displays such as the Microsoft HoloLens and the Magic Leap along with more widely available experiences on mobile devices.
In a previous post we looked at how to compile the popular programming language Go to WebAssembly. WebAssembly is a new programming language which provides a compact binary format for the web.
Photo by Annie Spratt on Unsplash The Ecma TC39 committee, which standardizes the JavaScript language (officially known as ECMAScript), has been discussing a decorators proposal for several years. Transpilers like TypeScript and Babel implemented the initial version of the decorators proposal, allowing developers and frameworks to start using the proposal before the feature became an official part of the language standard.
SitePen participates in a number of conferences around the world presenting new technology and ideas to engineers and designers. Recently Dylan Schiemann and Tom Dye spoke at the HalfStack Conference in London and Paul Shannon spoke at Phoenix TypeScript meetup.
WebAssembly has grown in popularity due to its ability to improve application performance and support transpilation of source code in other languages into something that may get leveraged in a web browser. Every time the JavaScript language gets challenged, the community strives to create mechanisms to improve performance bottlenecks, which we have seen over the years with efforts from Mozilla, Google, Apple, and Microsoft.
The 2018 edition of the Node+JS Interactive conference featured nearly 1,000 JavaScript and Node.js enthusiasts at the first combined event organized by the Node.js Foundation and JS Foundation. The event included nearly 100 sessions, panels, and community events designed to help grow and foster the JavaScript ecosystem.
At this month’s FullStack London 2018, our CEO, Dylan Schiemann, presented the talk “Choosing a Framework”, based on our Choosing a Framework blog series. Given our long history in web development, we’ve seen JavaScript evolve from an obscure simplistic scripting language to the language of the internet.
Resize Observer allows developers to receive notifications when the size of an element’s content rectangle changes. This helps manage a variety of application layout scenarios including responsive application layout, flexible layouts such as split panes, or dynamic changes in content within an element in a page.
Nest is a scalable framework for building server-side applications. It is authored in TypeScript and relies on the Express framework.
At the recent TSConf, SitePen engineer Sarah Higley delivered a talk titled Escape the Office: Designing Interfaces for Other Developers. The moment you step into any large project or open source venture you must accept that code you write gets used in ways you did not originally intend.
WebAssembly is an emerging standard for a low-level assembly-like language in a compact binary format that runs with near-native performance, and is available as a compilation target for a variety of languages. We’ve heard significant misunderstanding around WebAssembly and what it means for the web and JavaScript.
In case you missed it, SitePen was the presenting sponsor of the inaugural TSConf which took place in Seattle on March 12, 2018! The Backstory In 2017, we met the TypeScript team in person after years of being avid members and contributors to the TypeScript project. We asked them when the first TypeScript conference would be and they answered with: “Do you want to do it?” SitePen, along with various members of its team, has organized community meetups, sponsored conferences and have, of course, been speakers at many events, but this was the first time we had ever considered tackling an entire conference from start to finish.
Intern Recorder is a Chrome extension that can kickstart the process of creating functional tests for Intern. It was initially released in 2015 users of Intern authored test suites as AMD modules.
Intern is a popular JavaScript testing framework with an extensive feature set. While Intern has traditionally been focused on testing applications written in standard JavaScript, it has also had great support for TypeScript.
TypeScript 2.6 was released on the 31st of October. It is a moderately sized release like many of the other of the more rapid releases from the TypeScript team over the past year.
Whenever you start working with a new programming language or framework, you need to learn a new collection of error messages and how to resolve them. Sometimes those messages are obvious, and others only become obvious as you gain experience with the new technology.
It is like the old proverb, “It takes a village to raise a web framework.” As we explored in the previous post, choosing a framework goes beyond the technical features of a framework and this is certainly true when it comes to the wider community, which includes considerations like licensing, how open the framework is, and where to turn for education and support. While each web framework we have been discussing is an open source framework, there is a wide spectrum of what that actually means and how it affects the use and future development of a framework.
For a web framework to be effective, it should offer you more than just functionality. It doesn’t matter how much hard work you put into your application if it breaks when people use it.
Intern is an incredibly powerful and feature-rich approach to all types of JavaScript and TypeScript testing. Intern 4 is a major update refactored in TypeScript and with much improved support for modern language features and support for ESM as well as bundlers like webpack.
Over the past year we’ve been heads-down working hard on Dojo 2 and its component architecture. The ability to change default component behavior is essential to a widget library, and several tactics exist for doing so.
Unless you have a time machine or a TARDIS, it’s pretty rare to have solid documentation in place before an open source project is released! While we’re getting close to a beta release with the Intern 4 and while we still have a fair amount of documentation and refinements to complete, a number of people have started using Intern 4 to leverage its support for easier testing with modern ES6+ and/or TypeScript features. Intern 4 has many benefits and improvements over Intern 3 and previous approaches to testing.
Test early, test often, and test some more. Why put our heart and soul into our web applications only to be let down because we are not completely testing them.
Previously on Web Frameworks, we looked at how various frameworks deal with the concept of applications. Akin to listening to the whole album, we got a sense of how the frameworks pull it all together.
Applications built with web technologies, something that was a curiosity a few short years ago, have emerged onto the scene as a must have for most organizations. Transcending websites and providing users with a more open and unbounded experience, web applications are everywhere.
We have previously discussed the look and feel of web frameworks. While we often become interested in a framework based on the stylishness of the widgets and applications it can create, this may lead to a similar approach to how we have historically selected music.
The TypeScript 2.4 release might be a minor update in terms of not requiring substantial changes within our open source work and customer projects, but it provides some major benefits that we are already leveraging throughout the Dojo 2 codebase. The headline feature for TypeScript 2.4 is support for the ES.Next dynamic import() expressions that emit down to a require and will enable us to replace the existing @dojo/core/load module that is currently used to lazily load modules and mark modules for code splitting, and remove a significant amount of code and complexity from our @dojo/cli-build-webpack cli command package.
While instruments such as guitar and drums are part of a band, how they are used by the musicians define the style of the band’s music. Similarly, the elements of an application user interface connected together define the user experience.
Since we released Intern in 2013, the state of JavaScript testing has changed substantially. The JavaScript world was a very different place.
Whether it is Top 40 or classical or R&B, artists and music have a recognizable look and feel. When looking at frameworks, some simply provide us with a bag of instruments, while others provide us with chord progressions and album covers we can customize.
…we would all be using justin-bieber.js. We as an organization have been working with JavaScript since 2000.
For a concise read on why the enterprise should care about using TypeScript in its applications, look no further than Remo Jansen of the Aon Centre for Innovation and Analytics’ presentation on the 6 reasons you should be using TypeScript. The SitePen engineering team has been using TypeScript since it came onto the open source scene 5 years ago.
TypeScript 2.3 is the latest version in the quarterly release cycle from the TypeScript team. This release contains several useful additions to TypeScript which we have already started to leverage within some of our current projects.
dojox/gfx is Dojo 1.x’s vector graphics library, with support for SVG, Canvas, and other legacy rendering environments through a drawing API based on the semantics of SVG. This API also provides the foundation for dojox/charting.
Over the past several months, the SitePen team has been hard at work on Dojo 2 along with the tools and infrastructure to support it. Part of that infrastructure, and one of the major priorities for Dojo 2, is to have top notch developer documentation, complete with examples, tutorials, and API documentation.
In our recent post about the key features in ES2017, I was reminded just how much the standards process has changed in the past 15 years. As someone who tried to get involved early to improve standards, the process was broken and I was quickly discouraged.
As many of you know, Dojo 2 is being built on TypeScript. Many of us involved in Dojo 2 believe that TypeScript brings several advantages to developing with web technologies these days.
As we near the finalization of the proposal, it’s looking like ES8 is going to deliver much more than the simple updates of its ES7 predecessor! We wanted to take a few moments to highlight our 5 favorite things about the upcoming 2017 release. This change is one we’re very excited about, and something we’ve already shimmed in Dojo 2.
Functional programming and reactive programming principles are not new to JavaScript, but their adoption has recently become widespread across most modern frameworks and toolkits. The ease of using these approaches has improved as we’ve finally seen the decline of legacy browsers, and as we’ve seen the introduction of functional and reactive paradigms within ES6 and ES8.
The TypeScript team recently announced the TypeScript 2.2 release candidate which will contain key improvements to the TypeScript language. Most notably, are the introduction of the object type and improved support for mixins and composable classes.
The motivation for Intern 4 is to make it easier to author tests with ES6+ features within tests, with or without transpilation. Want to skim? Here’s the Intern Roadmap which lists our high level status for each Intern release going forward.
As the new year starts to unfold, it’s time to take a quick look at the things our team at SitePen resolves to do this year. Too often, we see large enterprise customers who have multiple teams creating the same features, without having a simple way to share and maintain code over time.
Thanks to a generous Mozilla Open Source Support program award, Intern has expanded its testing ecosystem to include new and robust sets of tools. Engineers can now easily write tests to benchmark sections of code, test for accessibility (a11y) support, and test for visual differences.
The TypeScript team has just announced the release of TypeScript 2.1 which contains several long-awaited features (pun intended) for Dojo 2. Rather than repeating the excellent summary from the TypeScript team, we’ll look at how a few of these features will improve Dojo 2! Dojo 2 supports exporting to ES5 environments.
Today we’re pleased to announce the release of Intern 3.4. This release brings usability enhancements and bugfixes, including a new benchmarking mode! We’ve outlined some of the features below, but as always, visit the release notes for more details.
This October, we delivered meetup talks on WebVR in London and Phoenix on the same day to share our early efforts in exploring WebVR with TypeScript, Dojo 2, Intern, and A-Frame. WebVR is an experimental JavaScript API that provides access to Virtual Reality (VR) devices, such as the Oculus Rift, HTC Vive, Samsung Gear VR, and Google Cardboard.
One of the main challenges with creating modern JavaScript web applications is the relatively incomplete approach to ES modules. As an interim solution until all necessary use cases are solved, many developers create source code with ESM, and then transpile to either AMD, CJS, or UMD for easy usage within today’s browsers.
SitePen Support is a service used by companies to improve the productivity and efficiency of their enterprise development teams. Our customers often ask questions about best practices when using various development tools for modern JavaScript and TypeScript development.
Over the past few years, TypeScript has iterated and greatly improved developer ergonomics. With our efforts on Dojo 2, we’ve been very excited about many of the features and improvements made, including several key improvements that have landed for TypeScript 2, which is currently in beta release! TypeScript 2 adds a major improvement in the type analysis of code.
FullStack is a large London JavaScript conference hosted at the Skills Matter CodeNode. The conference brings together an impressive line-up of speakers and workshops covering five tracks over three full days of festivities.
In this installment of our series on building web applications, we look at the SitePen approach to solving challenges in web application development. We employ all of the solutions described in part 2 of the blog series.
While there are many challenges today with building web applications, there are also many options to address the issues we face with technology, process, and people, allowing us to reap the benefits of the web as an application platform. While many of the challenges with today’s web applications come from the vast array of technologies that are available, there are clear strategies that can be employed to turn those same issues into advantages that can make building applications easier.
Web applications provide many benefits. Most organizations seek to improve the efficiency and effectiveness of business processes through the use of software.
Peter Higgins, former project lead for Dojo, gave an excellent talk at JSConf in 2013 titled “Dojo Already Did That” (which reflected a humorous meme started at the first JSConf). It was highly informative about how Dojo had already solved problems that the JavaScript community were solving again in 2013.
Symbols are a new, unique, primitive type introduced in ECMAScript 6 (ES6). They were added to the language in order to solve the problem of extending the functionality of Object while maintaining backwards-compatibility with code written in earlier versions of JavaScript.
I attended the Microsoft Edge Web Summit in San Francisco. I will be honest, outside of meeting a few people, I wasn’t expecting much.
Picture this: 100+ developers and their phones and laptops making crashing noises playing a live-created clone of Flappy Bird. Now picture the same devices working together to create a live MIDI concert, followed by a challenging and fun JavaScript pub quiz.
One of the main benefits of working in TypeScript is that it lets developers use modern standards within their source code today. Tools like destructuring, rest and spread operations, and classes make it easier to define structures and work with data.
I had the pleasure of attending Connect-JS in Atlanta this past weekend and had a great time speaking, attending talks and meeting some very talented people. Connect-JS totes itself as being a low-cost, community conference that brings in recognized experts from around the world.
The V8 team (the JavaScript engine that powers Chrome, Opera, Node.js, MongoDB, etc…) are moving forward with an experiment in defining a stronger version of JavaScript that ensures that code being run is behaving well, and introducing run-time typing based on TypeScript’s typings. V8’s motivation is always performance, and a more stringent set of ECMAScript would obviously allow them to tune the engine to streamline performance, but are there other benefits? Update: Status of the V8 strong mode experiment.
Transpiling or compiling code has become a necessity today for JavaScript-based web development. Whether you are using TypeScript, Babel, Dart, Traceur, or CoffeeScript to provide additional language features, or trying to optimise your code with the likes of UglifyJS, r.js, or Closure Compiler, once you have modified your source code, you start to run into challenges.
SitePen is a huge supporter of TypeScript. It allows our developers to write using modern standards support for ES6 and some ES7 features while still targeting ES5 browsers.
Over the past several years, JavaScript has grown to be relevant not only for rich browser applications, but also for server and console applications. Many types of JavaScript libraries can be useful on both ends of this spectrum.
At the end of 2014, we looked ahead to determine where to focus SitePen’s open source efforts in the coming year. After our successful contributions to dgrid and the new dstore package, it became increasingly clear that contributing to the future of Dojo was where our team would have the biggest impact and the most fun.
This post has been updated to cover Intern 3.4 and TypeScript 2.3. Read our Intern 4 and TypeScript testing article for more recent information.
This article describes the features and functionality of TypeScript 2.5. While TypeScript is very simple to understand when performing basic tasks, having a deeper understanding of how its type system works is critical to unlocking advanced language functionality.
Receive Our Latest Insights!
Sign up to receive our latest articles on JavaScript, TypeScript, and all things software development!