How Does the TypeScript Team Try to Avoid Negative Effects on the JS Ecosystem

Rate this content
Bookmark

TypeScript is becoming one of the dominant ways in which people write JavaScript. The goal of TypeScript is to augment and not replace JavaScript – so how does the team ensure that the future of JS is always JS.

This talk has been presented at JSNation Live 2020, check out the latest edition of this JavaScript Conference.

FAQ

TypeScript is a programming language developed by Microsoft that builds on JavaScript by adding static type definitions. Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.

The main design goals of TypeScript include imposing no runtime overhead on emitted programs, aligning with current and future JavaScript proposals, preserving the runtime behavior of all JavaScript code, and using a consistent, fully erasable structural type system.

TypeScript influences the JavaScript ecosystem by providing a type system that helps developers manage larger codebases more effectively. It aims to enhance JavaScript development by adding static types, which can catch common errors during development, thus improving code quality and maintainability.

The TypeScript team consists of about eight people working on the compiler and around 20 folks in total, including project managers and a separate team that handles integration with Visual Studio (not Visual Studio Code), focusing on bug tracking and ensuring TypeScript is as bug-free as possible.

TypeScript actively participates in TC-39 meetings, which are discussions on the future of JavaScript. TypeScript's role is to contribute and provide feedback, particularly on features that could be supported by a type system, aligning TypeScript's goals with the broader JavaScript community.

TypeScript aims to preserve the runtime behavior of JavaScript, meaning that JavaScript code input into TypeScript should output the same JavaScript code. TypeScript focuses on type checking at compile time without altering the runtime execution of the JavaScript code.

TypeScript's popularity, evidenced by its high ranking in developer surveys, indicates a strong adoption among JavaScript developers. This adoption is partly due to TypeScript's ability to improve code robustness and developer productivity, especially in larger codebases.

Orta Therox
Orta Therox
33 min
18 Jun, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
TypeScript aligns with current and future JavaScript proposals, preserving runtime behavior and avoiding new syntax. The TypeScript team focuses on type inference to find errors and make code more maintainable. TypeScript's popularity is evident among JavaScript programmers and it solves real problems in large codebases. The TypeScript playground demonstrates the goal of erasing the type system and producing real JavaScript. TypeScript aims to push JavaScript in a positive direction and add features in hidden ways, prioritizing stability and consensus before implementing new language features. The team works closely with TC-39, ensuring that TypeScript's goals align with JavaScript's future. TypeScript's future involves maintaining backward compatibility and avoiding runtime overhead, while also improving TypeScript semantics and encouraging the use of modern JavaScript syntax. The TypeScript team is committed to accessibility work, supporting multiple languages, localization, and improving the website's usability.

1. Introduction to TypeScript and its Influence

Short description:

In this part, we will discuss TypeScript's influence in the JavaScript ecosystem and how the TypeScript team aims to align TypeScript and JavaScript to create innovative solutions. We will also explore the attempt to replace JavaScript with TypeScript and gain insights into the goals and principles of the TypeScript team. Let's dive in!

All right, start betting on TypeScript. So I'm going to try and talk a little bit about TypeScript's influence in the JavaScript ecosystem, you know, how the TypeScript team try to sort of constrain themselves in order to make sure that, you know, TypeScript and JavaScript are both like sort of allies in trying to make cool things in JavaScript.

And then sort of what does it look like if there was an attempt at trying to usurp JavaScript via TypeScript by the team at Microsoft. And hopefully with all of that, we'll all come out a little bit smarter and have different ideas about how all the pieces come together.

Okay, so get started. My name is Ohto the Rocks. I've been doing large scale open source projects for a very long time, starting with a dependency manager for iOS. Moving on to this sort of cultural tool of across many different programming languages allow you to sort of create linter rules around how pull request etiquette works.

And I spent a lot of time, quite recently, just working in the TypeScript era, like trying to figure out how to build complicated tools for it, and how all these pieces come together. That eventually sort of turned into me working on TypeScript full time. And so now that means I've got quite a lot of insight that I think would be super useful and it's kind of unique. So I'm gonna try and talk about how all that comes together.

So the goals of this talk are to try and make it a little bit different from your average TypeScript talk. Most talks about TypeScript try and talk about, like, what features are useful or, you know, how to provide useful editor tools, things like that. But this talk actually, like, takes a step back and tries to think about how TypeScript affects the entire sort of industry. And you know, what the TypeScript team does to try and make sure that that's entirely copacetic. So buckle up and we'll have a good time.

To get started, we'll talk a little bit about the TypeScript team, if you don't know. We're roughly eight people that work on the compiler, and about 20 folks altogether. That means project managers. And there's an entirely other team whose job is to handle the integration with Visual Studio, not Visual Studio code, which is quite a considerable amount of work. And they do a huge amount of, like, good bug tracking and making sure that, like, TypeScript is as bug-free as possible.

The team itself has a few sort of long-term goals and kind of principles. The two main documents around this, there is the operating principles. These try to describe, like, what the TypeScript project represents. So, you know, what is the long-term goal? How do we perceive ourselves in relationship to other programming languages versus in relation to other like JavaScript style, like transpile to JavaScript programming languages? These just sort of say, like, you know, this is how we define ourselves. And then the other one, and potentially the more interesting one for this talk, the TypeScript design goals. There's a lot here. So we'll kind of split it into two. So there's like the design goals for interacting with JavaScript, right? So impose no runtime overhead on emitted programs is highly jargon-to-speak for just outright saying, if you put JavaScript into TypeScript, you get JavaScript back and we don't change things.

2. TypeScript's Influence and Popularity

Short description:

TypeScript aligns with current and future JavaScript proposals, preserving runtime behavior and avoiding new syntax. It focuses on inference to find errors and make code more maintainable. TypeScript's popularity is evident in its high usage among JavaScript programmers. It solves real problems in large code bases and serves as excellent PR for Microsoft. TypeScript's success contributes to the growth of Microsoft's development ecosystem.

And then the next one is like aligning with current future like JavaScript proposals. So don't go off and make your own language that feels like JavaScript but does something else. And keep up to date with as JavaScript changes. We'll talk a little bit about that later. Preserve the runtime behavior of all JavaScript code. Also talks to the same idea of JavaScript in and JavaScript out. Avoiding adding expression-level syntax, we will get into later in more detail. And use a consistent fully erasable structural type system. Also something we'll get into more detail later.

And then on the other side, you know, there's JavaScript and then there's types. Which is the types of TypeScript. And, you know, TypeScript has a kind of unique take on type systems because it cannot create new syntax realistically, within some constraints to sort of help do existing design patterns. So TypeScript tries to do as much as possible via inference. And by goal, they specifically try to find, like, code that's likely to be errors and provide systems for working towards it, instead of creating new ideas and new paradigms in which people can sort of write code. The idea is, instead, make it so that you can find bad code easier, rather than pushing people in a particular direction.

On top of that then, you know, I can talk about how TypeScript influences the industry, but you kind of have to understand how, like, how big TypeScript is to get a sense of this. So, like, what makes TypeScript big? I think a recent poll that I think is quite useful is Stackoverflow. Stackoverflow is a website where you can ask questions. But one of the interesting things here is it's not a JavaScript-specific, like, developer ecosystem. It is a, all developers use Stackoverflow in every single programming language, basically. So when you see results from those kind of polls, then you can know that they're not, like, directly, like, oriented to a specific type of developer. So, on the left, you can see that TypeScript is the second most loved language in the world. And, on the right, you can see that, like, basically, one in three JavaScript programmers are also using TypeScript. So, that's a lot. There's a bazillion JavaScript programmers, so there must be a third of a bazillion TypeScript programmers. And, you know, you might be wondering to yourself, okay, so, it's popular, people like it. There's also, like, a question that, like, I always ask, which is, like, how does TypeScript get funded? And why is it even created? Well, in part, because it solves real problems in building large code bases in Microsoft and the other part is it's incredible PR for Microsoft. Like, you know, people sort of are introduced to Microsoft development environments outside of Windows now via VS Code and TypeScript, and then they go from there and say, huh, if VS code works well and TypeScript works well, well, maybe this Azure works well. Oh, the dog's come down. So, you know, if you want more TypeScript compiler engineers, start using Microsoft Azure.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
React's Most Useful Types
React Day Berlin 2023React Day Berlin 2023
21 min
React's Most Useful Types
Top Content
Watch video: React's Most Useful Types
Today's Talk focuses on React's best types and JSX. It covers the types of JSX and React components, including React.fc and React.reactnode. The discussion also explores JSX intrinsic elements and react.component props, highlighting their differences and use cases. The Talk concludes with insights on using React.componentType and passing components, as well as utilizing the react.element ref type for external libraries like React-Select.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
TypeScript and React: Secrets of a Happy Marriage
React Advanced 2022React Advanced 2022
21 min
TypeScript and React: Secrets of a Happy Marriage
Top Content
React and TypeScript have a strong relationship, with TypeScript offering benefits like better type checking and contract enforcement. Failing early and failing hard is important in software development to catch errors and debug effectively. TypeScript provides early detection of errors and ensures data accuracy in components and hooks. It offers superior type safety but can become complex as the codebase grows. Using union types in props can resolve errors and address dependencies. Dynamic communication and type contracts can be achieved through generics. Understanding React's built-in types and hooks like useState and useRef is crucial for leveraging their functionality.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
WebAssembly enables optimizing JavaScript performance for different environments by deploying the JavaScript engine as a portable WebAssembly module. By making JavaScript on WebAssembly fast, instances can be created for each request, reducing latency and security risks. Initialization and runtime phases can be improved with tools like Wiser and snapshotting, resulting in faster startup times. Optimizing JavaScript performance in WebAssembly can be achieved through techniques like ahead-of-time compilation and inline caching. WebAssembly usage is growing outside the web, offering benefits like isolation and portability. Build sizes and snapshotting in WebAssembly depend on the application, and more information can be found on the Mozilla Hacks website and Bike Reliance site.

Workshops on related topic

React, TypeScript, and TDD
React Advanced 2021React Advanced 2021
174 min
React, TypeScript, and TDD
Top Content
Featured WorkshopFree
Paul Everitt
Paul Everitt
ReactJS is wildly popular and thus wildly supported. TypeScript is increasingly popular, and thus increasingly supported.

The two together? Not as much. Given that they both change quickly, it's hard to find accurate learning materials.

React+TypeScript, with JetBrains IDEs? That three-part combination is the topic of this series. We'll show a little about a lot. Meaning, the key steps to getting productive, in the IDE, for React projects using TypeScript. Along the way we'll show test-driven development and emphasize tips-and-tricks in the IDE.
Mastering advanced concepts in TypeScript
React Summit US 2023React Summit US 2023
132 min
Mastering advanced concepts in TypeScript
Top Content
Featured WorkshopFree
Jiri Lojda
Jiri Lojda
TypeScript is not just types and interfaces. Join this workshop to master more advanced features of TypeScript that will make your code bullet-proof. We will cover conditional types and infer notation, template strings and how to map over union types and object/array properties. Each topic will be demonstrated on a sample application that was written with basic types or no types at all and we will together improve the code so you get more familiar with each feature and can bring this new knowledge directly into your projects.
You will learn:- - What are conditional types and infer notation- What are template strings- How to map over union types and object/array properties.
Deep TypeScript Tips & Tricks
Node Congress 2024Node Congress 2024
83 min
Deep TypeScript Tips & Tricks
Top Content
Featured Workshop
Josh Goldberg
Josh Goldberg
TypeScript has a powerful type system with all sorts of fancy features for representing wild and wacky JavaScript states. But the syntax to do so isn't always straightforward, and the error messages aren't always precise in telling you what's wrong. Let's dive into how many of TypeScript's more powerful features really work, what kinds of real-world problems they solve, and how to wrestle the type system into submission so you can write truly excellent TypeScript code.
Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Top Content
Featured Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
Best Practices and Advanced TypeScript Tips for React Developers
React Advanced 2022React Advanced 2022
148 min
Best Practices and Advanced TypeScript Tips for React Developers
Top Content
Featured Workshop
Maurice de Beijer
Maurice de Beijer
Are you a React developer trying to get the most benefits from TypeScript? Then this is the workshop for you.In this interactive workshop, we will start at the basics and examine the pros and cons of different ways you can declare React components using TypeScript. After that we will move to more advanced concepts where we will go beyond the strict setting of TypeScript. You will learn when to use types like any, unknown and never. We will explore the use of type predicates, guards and exhaustive checking. You will learn about the built-in mapped types as well as how to create your own new type map utilities. And we will start programming in the TypeScript type system using conditional types and type inferring.
Building Your Own Custom Type System
React Summit 2024React Summit 2024
38 min
Building Your Own Custom Type System
Featured Workshop
Kunal Dubey
Kunal Dubey
I'll introduce the audience to a concept where they can have end-to-end type systems that helps ensure typesafety across the teams Such a system not only improves communication between teams but also helps teams collaborate effectively and ship way faster than they used to before. By having a custom type system, teams can also identify the errors and modify the API contracts on their IDE, which contributes to a better Developer Experience. The workshop would primarily leverage TS to showcase the concept and use tools like OpenAPI to generate the typesystem on the client side.