Dan Kennedy

Frontend Engineering Speakers: Ryan Cavanaugh, The Design of TypeScript

Canva is proud to be hosting a second Frontend Engineering Sydney event on May 31. Our main speaker will be Ryan Cavanaugh, one of the core contributors to TypeScript at Microsoft. Canva is flying Ryan out from Seattle to provide deep insights about the design, philosophy and future of TypeScript - the superset of JavaScript developed by Microsoft to allow static typing and make it more maintainable and powerful for large-scale projects. Tickets are available here, while they last!

We spoke with Ryan about his history, his current role and his passion for TypeScript.

Ryan Cavanaugh

Ryan Cavanaugh


What was the initial inspiration for TypeScript? As an evangelist for TypeScript, what is the main thing that excites you about it today?

TypeScript started when it became apparent at Microsoft that we’d be writing many more large JavaScript applications in the future, but JS wasn’t well-suited for large-scale application development due to maintainability problems presented by a lack of static typing.

TypeScript inspires me because it solves a real problem in a simple, elegant way. There’s nothing I love more than seeing someone on Twitter say something like “I was hesitant at first, but I’m never going back to JS after using TypeScript” – it means we’ve done our jobs right.


What did you work on at Microsoft before TypeScript, and how did you get involved in TypeScript? 

Before working on TypeScript I worked on the internal tools we use in Visual Studio to automate testing VS, and before that on Visual Studio LightSwitch.

After a reorg in my previous role, I decided it was time for a new job. I started learning JavaScript (because it was clearly about to overtake the world), and was continuously frustrated by silly runtime errors that could have been easily detected by a computer. This was peak CoffeeScript time but I realized that the problem with JS was its semantics, not its syntax! The next week I heard about this “Strada” (codename for TypeScript) project, got a demo from a PM on the team, and my first reaction was “This is exactly the thing I’ve been looking for. Are you hiring?” I joined the team in April 2012.


What was your role in the development of TypeScript? What is your role now on the TypeScript team?

My first task was to revamp the testing suite we use to keep TypeScript stable. Since then I’ve worked on all aspects of the language, most notably adding JSX/React support to the language, creating our automatic type acquisition (NPM @types) story, adding language service extensibility, and now working on adding refactoring support.

As a developer on the team I’m responsible for general feature implementation and bug fixes. Additionally I maintain our GitHub process and am a primary triager of issues reported on our GitHub repo. As part of this work I drive decisions on community suggestions, provide language design and prioritization feedback, and try to engage with the community as much as I can. I also do some work on the Node Tools for Visual Studio.


What do you see in the future for TypeScript?

TypeScript started with a great minimum viable product – ES6 with basic static typing. Since then we’ve grown in two different directions, the first being providing a better and more comprehensive migration story for existing JavaScript codebases, the second being stricter and smarter typechecking for codebases written in TypeScript. I see great progress ahead in both of those fronts - the new “checkJs” mode will allow people to use TypeScript’s great type system in .js files, and the new “strict” mode will let developers opt in to our tightest type system for higher confidence.

ECMAScript’s continued deliberate evolution is going to help everyone tremendously, especially with the broad adoption of downlevel transpilers. There are three broad categories here we’re looking at. First we have basic API improvements – things like String.trimStart or named RegExp capture groups. These will work out of the gate with TypeScript and are good general value-adds. Then we have new syntax, like public class fields, that is already available in TypeScript (mostly for historical reasons). We’re trying to be “ahead” of ECMAScript less often and let the committee drive these things more often to reduce design uncertainty. Finally, there are some longer-term things that will be even bigger wins for TypeScript users – the bind operator, nameof, and better export/import options will really improve coding patterns in both TypeScript and large JavaScript apps.


Give us a sneak preview of what your talk will be all about.

I’ll be covering Typescript’s design process and philosophy, examples of trade-offs we’ve made in the language and their impact, how and why we’ve made breaking changes, how we pick new features, and an exploration into what “soundness” means for a JS-based language (sort of a comparison with Flow and how the two languages make similar but subtly different trade-offs in this space).


Join us on May 31 to hear Ryan, Sharon Kuo and Marc Fallows of Canva, as well as Chloe Chen of the CSIRO talk about “typed JavaScript” technologies - how they use them and what the future holds. Frontend Engineering Sydney events are a chance to mingle with engineers from all over Sydney, and include catering from Canva’s amazing in-house chefs. All proceeds from this event go to Curious Minds, an organisation which supports year 8 and 9 girls to explore STEM.

Grab yourself a ticket here, while they last!