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.

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's influence in the JavaScript ecosystem and its alignment with JavaScript's goals and principles. TypeScript's impact on the industry and its popularity among JavaScript programmers. The goal of TypeScript to innovate in types without introducing new concepts to JavaScript. The challenges of running TypeScript on other people's code and making it a native browser language. TypeScript's compatibility with JavaScript and its aim to be a thin layer on top of JavaScript. The efforts to improve support for JS and JS docs and the pain points of transitioning to TypeScript. The accessibility work in TypeScript and the absence of real competitors in the market.

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
Do you have a large product built by many teams? Are you struggling to release often? Did your frontend turn into a massive unmaintainable monolith? If, like me, you’ve answered yes to any of those questions, this talk is for you! I’ll show you exactly how you can build a micro frontend architecture with Remix to solve those challenges.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
Remix is a web framework that gives you the simple mental model of a Multi-Page App (MPA) but the power and capabilities of a Single-Page App (SPA). One of the big challenges of SPAs is network management resulting in a great deal of indirection and buggy code. This is especially noticeable in application state which Remix completely eliminates, but it's also an issue in individual components that communicate with a single-purpose backend endpoint (like a combobox search for example).
In this talk, Kent will demonstrate how Remix enables you to build complex UI components that are connected to a backend in the simplest and most powerful way you've ever seen. Leaving you time to chill with your family or whatever else you do for fun.
TypeScript and React: Secrets of a Happy Marriage
React Advanced Conference 2022React Advanced Conference 2022
21 min
TypeScript and React: Secrets of a Happy Marriage
Top Content
TypeScript and React are inseparable. What's the secret to their successful union? Quite a lot of surprisingly strange code. Learn why useRef always feels weird, how to wrangle generics in custom hooks, and how union types can transform your components.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
JavaScript in the browser runs many times faster than it did two decades ago. And that happened because the browser vendors spent that time working on intensive performance optimizations in their JavaScript engines.Because of this optimization work, JavaScript is now running in many places besides the browser. But there are still some environments where the JS engines can’t apply those optimizations in the right way to make things fast.We’re working to solve this, beginning a whole new wave of JavaScript optimization work. We’re improving JavaScript performance for entirely different environments, where different rules apply. And this is possible because of WebAssembly. In this talk, I'll explain how this all works and what's coming next.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
As developers, we spend much of our time debugging apps - often code we didn't even write. Sadly, few developers have ever been taught how to approach debugging - it's something most of us learn through painful experience.  The good news is you _can_ learn how to debug effectively, and there's several key techniques and tools you can use for debugging JS and React apps.
React's Most Useful Types
React Day Berlin 2023React Day Berlin 2023
21 min
React's Most Useful Types
Top Content
We don't think of React as shipping its own types. But React's types are a core part of the framework - overseen by the React team, and co-ordinated with React's major releases.In this live coding talk, we'll look at all the types you've been missing out on. How do you get the props type from a component? How do you know what ref a component takes? Should you use React.FC? And what's the deal with JSX.Element?You'll walk away with a bunch of exciting ideas to take to your React applications, and hopefully a new appreciation for the wonders of React and TypeScript working together.

Workshops on related topic

React, TypeScript, and TDD
React Advanced Conference 2021React Advanced Conference 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.
Best Practices and Advanced TypeScript Tips for React Developers
React Advanced Conference 2022React Advanced Conference 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.
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
React Day Berlin 2022React Day Berlin 2022
86 min
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
Top Content
WorkshopFree
Hussien Khayoon
Kahvi Patel
2 authors
Using a library might seem easy at first glance, but how do you choose the right library? How do you upgrade an existing one? And how do you wade through the documentation to find what you want?
In this workshop, we’ll discuss all these finer points while going through a general example of building a code editor using CodeMirror in React. All while sharing some of the nuances our team learned about using this library and some problems we encountered.
Deep TypeScript Tips & Tricks
Node Congress 2024Node Congress 2024
83 min
Deep TypeScript Tips & Tricks
Top Content
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.
Testing Web Applications Using Cypress
TestJS Summit - January, 2021TestJS Summit - January, 2021
173 min
Testing Web Applications Using Cypress
WorkshopFree
Gleb Bahmutov
Gleb Bahmutov
This workshop will teach you the basics of writing useful end-to-end tests using Cypress Test Runner.
We will cover writing tests, covering every application feature, structuring tests, intercepting network requests, and setting up the backend data.
Anyone who knows JavaScript programming language and has NPM installed would be able to follow along.
Build a powerful DataGrid in few hours with Ag Grid
React Summit US 2023React Summit US 2023
96 min
Build a powerful DataGrid in few hours with Ag Grid
WorkshopFree
Mike Ryan
Mike Ryan
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
We all know that rolling our own grid solution is not easy, and let's be honest, is not something that we should be working on. We are focused on building a product and driving forward innovation. In this workshop, you'll see just how easy it is to get started with AG Grid.
Prerequisites: Basic React and JavaScript
Workshop level: Beginner