Where TypeScript Excels

The New Stack · Intermediate ·📰 AI News & Updates ·4y ago

Key Takeaways

The video discusses the benefits and features of TypeScript, a superset of JavaScript, and how it excels in addressing limitations of JavaScript, with tools like Trusted types and V8 engine, and its applications in cloud infrastructure management and recursive types.

Full Transcript

[Music] and action hey everyone alex williams from the new stack here for another episode of the new stack shorts today we are talking about typescript the ever popular programming language in particular we're looking at the evolution of types themselves this is all based upon an interview we recently did on the new stack bakers i'm joined today to talk about the future of typescript with luke hobin who is the cto of bellumi and also one of the co-creators of typescript along with him we have daniel rossenwasser who is senior program manager at microsoft on the typescript team and brian kavanagh who was a principal software engineering manager at microsoft javascript became so popular and then people started thinking wait a second i can move these applications that are on the desktop over to the web let's use javascript but it didn't quite do it and so they thought how can we make this better what about types and that's when typescript came into the picture today what we see is a new frontier beyond the browser beyond just applications and into worlds such as infrastructure cloud management how do we give folks the tools to do that when they're targeting the web platform and by the web platform that meant really javascript in the browser and all the richness that that was uh was supporting uh and that you know platform was growing incredibly quickly right html standard was was moving fast at that period of time the ecmascript javascript standard was moving fast at that time this platform was getting very rich a lot of really rich applications were detailed the v8 you know engine and the chakra engine were bringing performance to that platform and so this tooling piece was sort of one big missing part of that but why types is it a security matter we think about security all the time these days it was really about data corruption typescript brings from my perspective on top of that is you know a number of the sort of security issues you end up having you know when you get past sort of off-road runs and that sort of thing which isn't really fundamentally kind of a problem in javascript you then get to more sort of like logic errors that developers may make where they're not you know correctly handling input data uh in a way which uh which they need to to have the right behavior for their their components and types of i think fundamentally helps by you know bringing types bringing static type checking these are tools that fundamentally help developers to sort of create more correct code by default without types there could be inadvertent issues that arise for example you can call parseint and um give it a number and that number will be converted to a string and then back into a number um and you might think that that's a fine thing to do but there are like hostile inputs that can show up here that will not round trip correctly but how do you even trust the types themselves there's an effort called trusted types where basically your server says to the client hey i want you to actually validate that anytime that you're about to put something into a slot in html like that needs to be a validated string in some capacity type doesn't actually help in that capacity directly because that has to be run time and force you need to basically make sure that you're not just arbitrarily putting a chunk of untrusted stuff onto the page but typeshift actually provides really solid tooling early if you're able to leverage that right so if you're able to say that you know in each of these places on the page i need to take a trusted string instead of an actual string well the types of supplements they experience because the actual enforcement is in your browser but you get a hint at right you know when you're editing in your ide your editor or whatever with a little red squiggle saying no you're putting an arbitrary string here but i need something that's actually validated before you do that security is not really like the primary thing but typestrip does provide a better experience and you know some guidelines to help guide you away from some of the pitfalls that you might encounter in javascript in that way today any number of services are built with typescript check out this perspective there's also this effort within microsoft called fluid framework of trying to make it so that you can get something like figma or like you know the collaborative editing in like docs or word or whatever and that's written in text driven so like that's that's a pretty cool use to see like a lot of these newer ideas of opening up new paradigms for people um and kind of lowering the barrier to entry is going to have potential as a first class citizen and also those staffs will probably be written in pedro too right just because the complexity it requires in some cases google's got textured as a first class citizen now like i think most if not all new projects if google are using typescript dropbox whenever i think about this list in my head i'm like who am i forgetting there's someone in many people because it's again it's like who is not using the language and now comes the next frontier for typescript the realm of cloud infrastructure management coming from the co-creator himself languages and in particular typescript are really valuable for cloud infrastructure where folks maybe used to be managing a handful of things just like they used to be managing small scripts in the web browser now they're managing tens of thousands of resources those things are changing quickly they've got real software complexity they've got to manage and so bringing those languages into the infrastructure and cloud management space is increasingly important for organizations that want to sort of get the most value out of the cloud platform typescript is turn complete types are like their own programming language you can run small programs and we've enabled people to write recursive types in a way that that is optimized and allows you to go a little bit farther there right so you can actually do this thing where like you do go through all the letters of a string and parse it out in some cases you know we're not trying to go crazy with it we're just trying to enable the right patterns where you're actually able to express what your javascript is doing at runtime we don't want people to go overboard but we're trying not to like get them stuck in some cases there's this pretty cool feature of like tail call optimization that kind of landed in thai shirt that was sort of like a braggy feature but but it's a thing where like library authors can use it and then everybody else sort of benefits from that but in the end what about types in javascript wouldn't it be cool to just hit f5 to refresh the code but then there's other matters you have to think about what about bundlers and what about how we view types themselves that could take a lot of work our experts say there are really three or four ways to think about types in the browser at the highest level is static verification that really serves as a way to verify a type next down is a runtime check which can show exceptions instead of data corruption and below that would be annotation perhaps most popular of all the ability to show comments that you can read in the source code the sort of annotations only model is the one that looks most likely to be successful you know it's easy to reason about like is a stringer number but when you get into like much more complex types that typescript lets you write um having the runtime evaluate those questions uh in a consistent manner is a lot more difficult not something that there's a lot of appetite for figuring out hey thanks for watching everyone check out our podcasts and new stack makers for the full interview with our typescript experts if you like this video please give us a thumbs up and if you'd like to see more videos like this you can always subscribe to our youtube channel we're on all the major social media platforms you can always find us at the new stack dot io we hope to see you soon [Music]

Original Description

Released as an open source in 2012, TypeScript was created as a superset of JavaScript; meaning anything you code in it is transpiled to JavaScript. Since then, TypeScript usage has soared: 69% of respondents now use TypeScript, compared to just 21% six years ago, according to the 2021 State of JS Survey. In this podcast, we discussed the evolution of one of the most in-demand programming languages by employers today, and what’s next for TypeScript in cloud infrastructure management. We spoke with Ryan Cavanaugh, a principal software engineering manager for Microsoft; Luke Hoban, chief technology officer for Pulumi, who was one of the original creators of TypeScript, and; Daniel Rosenwasser, senior program manager, Microsoft. Watch our recap here and our lightly edited transcript of the video: https://thenewstack.io/earning-its-way-to-a-first-class-programming-language-where-typescript-excels/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from The New Stack · The New Stack · 0 of 60

← Previous Next →
1 What's Next for the Cloud Foundry Foundation in 2017 with Executive Director Abby Kearns
What's Next for the Cloud Foundry Foundation in 2017 with Executive Director Abby Kearns
The New Stack
2 How Unikernels Can Better Defend against DDoS Attacks
How Unikernels Can Better Defend against DDoS Attacks
The New Stack
3 Weaveworks is Bringing Horizontal Scaling to Prometheus
Weaveworks is Bringing Horizontal Scaling to Prometheus
The New Stack
4 TNS Analysts Thanksgiving Special: The Evolution of Kubernetes and the Container Ecosystem
TNS Analysts Thanksgiving Special: The Evolution of Kubernetes and the Container Ecosystem
The New Stack
5 How Rancher Labs is Seeing Kubernetes Put to Work in Production
How Rancher Labs is Seeing Kubernetes Put to Work in Production
The New Stack
6 SAP Tests Kubernetes for Cloud-Native Enterprise Software Deployments
SAP Tests Kubernetes for Cloud-Native Enterprise Software Deployments
The New Stack
7 Event Marketing for Today's Developer Evangelists and Community Managers
Event Marketing for Today's Developer Evangelists and Community Managers
The New Stack
8 NodeSource Introduces Certified Modules to Improve Node.js Security
NodeSource Introduces Certified Modules to Improve Node.js Security
The New Stack
9 How Lightstep is Illuminating the Case for Distributed Tracing
How Lightstep is Illuminating the Case for Distributed Tracing
The New Stack
10 How OpenStack Aims to be More Inclusive without being Exclusive
How OpenStack Aims to be More Inclusive without being Exclusive
The New Stack
11 How Shuttlecloud Saves Time and Money by Monitoring with Prometheus
How Shuttlecloud Saves Time and Money by Monitoring with Prometheus
The New Stack
12 Creating Analytics-Driven Solutions for Operational Visibility
Creating Analytics-Driven Solutions for Operational Visibility
The New Stack
13 Understanding the Application Pattern for Effective Monitoring
Understanding the Application Pattern for Effective Monitoring
The New Stack
14 Building On Docker's Native Monitoring Functionality
Building On Docker's Native Monitoring Functionality
The New Stack
15 The Importance of Having Visibility Into Containers
The Importance of Having Visibility Into Containers
The New Stack
16 How Getting Your Project in the CNCF Just Got Easier
How Getting Your Project in the CNCF Just Got Easier
The New Stack
17 Tectonic Summit Pancake Breakfast: How to Sell Kubernetes to the Hypervisor-Minded
Tectonic Summit Pancake Breakfast: How to Sell Kubernetes to the Hypervisor-Minded
The New Stack
18 The Buzz at Tectonic Summit 2016 in New York City
The Buzz at Tectonic Summit 2016 in New York City
The New Stack
19 Bringing Clarity to the Future of Node.js Modules
Bringing Clarity to the Future of Node.js Modules
The New Stack
20 How FluentD Can Help Monitor Microservice Architectures Through Unified Logging
How FluentD Can Help Monitor Microservice Architectures Through Unified Logging
The New Stack
21 Reshaping Front End Development with Warehouse.ai
Reshaping Front End Development with Warehouse.ai
The New Stack
22 2016 Year End Wrap-Up: Discussing Docker, OpenStack, and Open Source
2016 Year End Wrap-Up: Discussing Docker, OpenStack, and Open Source
The New Stack
23 Here's Why You Should Build a Robot Using Node.JS: Because You Can
Here's Why You Should Build a Robot Using Node.JS: Because You Can
The New Stack
24 How the Node.js Foundation is Utilizing Participatory Governance Models
How the Node.js Foundation is Utilizing Participatory Governance Models
The New Stack
25 Set Up an MongoDB Replica Set in Less Than an Hour Using Bitnami Packages
Set Up an MongoDB Replica Set in Less Than an Hour Using Bitnami Packages
The New Stack
26 Determining Who Bears the Burden of Ensuring NPM Module Security
Determining Who Bears the Burden of Ensuring NPM Module Security
The New Stack
27 How Intel Snap uses Telemetry and Kubernetes to Drive Enterprise Efficiency
How Intel Snap uses Telemetry and Kubernetes to Drive Enterprise Efficiency
The New Stack
28 How the NFL Scored a Touchdown with its Open Source React Framework Wildcat
How the NFL Scored a Touchdown with its Open Source React Framework Wildcat
The New Stack
29 Aporeto CEO Dimitri Stiliadis: When it Comes to Security, Context is King
Aporeto CEO Dimitri Stiliadis: When it Comes to Security, Context is King
The New Stack
30 The Buzz at Node.JS Interactive
The Buzz at Node.JS Interactive
The New Stack
31 Why Going Serverless Doesn't Mean 'No Ops'
Why Going Serverless Doesn't Mean 'No Ops'
The New Stack
32 How Node.js is Transforming Today's Enterprises
How Node.js is Transforming Today's Enterprises
The New Stack
33 JJ Asghar Interview
JJ Asghar Interview
The New Stack
34 How Capital One is Using APIs to Streamline Auto Financing
How Capital One is Using APIs to Streamline Auto Financing
The New Stack
35 SXSW 2017: How Machine Learning Differs From Regular Programming
SXSW 2017: How Machine Learning Differs From Regular Programming
The New Stack
36 SXSW 2017: Data-Driven Applications with Capital One DevExchange's Hydrograph
SXSW 2017: Data-Driven Applications with Capital One DevExchange's Hydrograph
The New Stack
37 SXSW 2017: How Good Engineers Make Bad Business Decisions
SXSW 2017: How Good Engineers Make Bad Business Decisions
The New Stack
38 CloudNativeCon & KubeCon EU Pancake Breakfast 2017: Kubernetes and the Multi-Cloud
CloudNativeCon & KubeCon EU Pancake Breakfast 2017: Kubernetes and the Multi-Cloud
The New Stack
39 CNCF Executive Director Dan Kohn: What's Next for CNCF in 2017
CNCF Executive Director Dan Kohn: What's Next for CNCF in 2017
The New Stack
40 Exploring the Latest Container Runtime Projects in the CNCF
Exploring the Latest Container Runtime Projects in the CNCF
The New Stack
41 Exploring the Future of the Kubernetes Ecosystem
Exploring the Future of the Kubernetes Ecosystem
The New Stack
42 Kubernetes and Continuous Deployment
Kubernetes and Continuous Deployment
The New Stack
43 Kris Nova of Deis at CouldNativecon/Kubecon in Berlin
Kris Nova of Deis at CouldNativecon/Kubecon in Berlin
The New Stack
44 Docker's Quest for Simplicity with the Evolution of Containerd
Docker's Quest for Simplicity with the Evolution of Containerd
The New Stack
45 Developers First: The Cloud Foundry Service Broker API and Kubernetes
Developers First: The Cloud Foundry Service Broker API and Kubernetes
The New Stack
46 Mapping the Future of CoreOS's rkt in the CNCF
Mapping the Future of CoreOS's rkt in the CNCF
The New Stack
47 Red Hat and Dell EMC: Two Perspectives from DockerCon
Red Hat and Dell EMC: Two Perspectives from DockerCon
The New Stack
48 Capital One Opened its APIs to Third-Party Developers — Here’s What They Learned
Capital One Opened its APIs to Third-Party Developers — Here’s What They Learned
The New Stack
49 SUSE Joins the CNCF, Brings Kubernetes to OpenStack Cloud 7
SUSE Joins the CNCF, Brings Kubernetes to OpenStack Cloud 7
The New Stack
50 How Capital One Brings Open Source To The  Banking Industry
How Capital One Brings Open Source To The Banking Industry
The New Stack
51 OSCON Is Coming Back To Portland, A Show Wrapup With Co-Chair Kelsey Hightower
OSCON Is Coming Back To Portland, A Show Wrapup With Co-Chair Kelsey Hightower
The New Stack
52 Dev Or Ops Doesn’t Matter, You Need Observability
Dev Or Ops Doesn’t Matter, You Need Observability
The New Stack
53 Taking The Next Steps In Developing An Open Source Culture
Taking The Next Steps In Developing An Open Source Culture
The New Stack
54 SXSW 2017: How Capital One Became Technology-First With Open Source
SXSW 2017: How Capital One Became Technology-First With Open Source
The New Stack
55 Apcera   Old Apps Spanning New Clouds
Apcera Old Apps Spanning New Clouds
The New Stack
56 Provenance: The Peace of Mind Chef Habitat Seeks to Deliver
Provenance: The Peace of Mind Chef Habitat Seeks to Deliver
The New Stack
57 InSpec: Human Readable, Automated Compliance
InSpec: Human Readable, Automated Compliance
The New Stack
58 The Evolution of SAP HANA Express
The Evolution of SAP HANA Express
The New Stack
59 Women Engineers Who Inspire And Never Give Up
Women Engineers Who Inspire And Never Give Up
The New Stack
60 Three Perspectives on the Evolution of Container Security
Three Perspectives on the Evolution of Container Security
The New Stack

TypeScript is a superset of JavaScript that provides static type checking and other features to help developers create more correct code, and is valuable for cloud infrastructure management and recursive types. The video discusses the benefits and features of TypeScript and how it excels in addressing limitations of JavaScript. By watching this video, viewers can learn how to design APIs with TypeScript, implement recursive types, and optimize backend performance.

Key Takeaways
  1. Install TypeScript and set up a new project
  2. Use Trusted types to validate user input
  3. Implement recursive types and tail call optimization
  4. Use TypeScript for cloud infrastructure management
  5. Evaluate complex types at runtime
💡 TypeScript provides a better experience and guidelines to help guide developers away from pitfalls in JavaScript, and is valuable for cloud infrastructure management and recursive types.

Related Reads

Up next
How to Handle the AI Shift
Matt Tutorials
Watch →