Skip to content
Episode #83: Serverless and TypeScript with Tim Suchanek episode artwork

EPISODE · Jan 11, 2021 · 1H

Episode #83: Serverless and TypeScript with Tim Suchanek

from Serverless Chats · host Jeremy Daly & Rebecca Marshburn

About Tim Suchanek Tim Suchanek is the lead TypeScript developer at Prisma, which makes advanced data infrastructure developed at large tech companies accessible to all developers around the world. Based in Berlin, Tim has been creating web applications for over 10 years, and enjoys great developer experience and cutting edge technologies. Twitter: @TimSuchanek LinkedIn: linkedin.com/in/tim-suchanek-08219346 Prisma: https://www.prisma.io/ Prisma Client: https://v1.prisma.io/docs/1.34/prisma-client/ GitHub: https://github.com/prisma "Generics, Conditional types and Mapped types": https://www.youtube.com/watch?v=PJjeHzvi_VQ GitHub: https://github.com/prisma"A Practical Introduction to Database Migrations": https://www.youtube.com/watch?v=xfaps6hgFvI "How Prisma Solves the N+1 Problem in GraphQL Resolvers": https://www.youtube.com/watch?v=7oMfBGEdwsc Watch this episode on YouTube: https://youtu.be/Cci65o4IxaU Transcript Jeremy: Hi, everyone. I'm Jeremy Daly and this is Serverless Chats. Today, I'm speaking with Tim Suchanek. Hey, Tim. Thanks for joining me. Tim: Thanks for having me, Jeremy. Jeremy: You are a TypeScript lead at Prisma. Why don't you tell the listeners a little bit about your background and what Prisma does. Tim: Yeah. First of all, thanks for having me. It's an honor to be here. I have listened to several episodes already. Prisma is basically a database tooling company, you could say, where our core is implemented as open source. Everything we build is available for everyone, and everyone can contribute. What we basically focus on right now is a database client, database access, but we're also working on schema migrations. What this database client is doing is mostly giving you type-safe access to your database. We do that in TypeScript. The way Prisma is architectured, we can also implement clients in different languages like Go or Java. We have the core of the query engine is written in Rust, and TypeScript is basically a layer on top to give you type safety for your database. With type safety, I mean if you for example say, "I want to select a certain field," then you will also in your types, in your code will have the guarantee that this field will be there. I believe that still until today this is the only client out there giving you really this kind of experience. How this works is through code generation. We employ code generation quite heavily, and you define declaratively your schema. You say, "I have a user. A user has a post and so on or has posts." Based on this schema definition, we then generate the whole client in TypeScript. This is now in GA since 2020. We have been working on this for two years, and in general Prisma already exists for nearly five years. That's what we're doing. Obviously, if you use your database, you oftentimes in 2020 you use serverless, and so we see many users, we see a lot of adoption rising there. While still many users are using this in a containerized fashion, we see a big growth also how this is being used in Lambda and serverless. Jeremy: What about your background? How did you get into TypeScript? Tim: It's funny because I started JavaScript I think nine years ago and did not really besides having had type languages in uni like Haskell and Java, the usual stuff we had to look into, besides that I was really into dynamically typed languages, not really a big fan of anything. The type system was my enemy basically. TypeScript came around 2015, I had the first look into it. Actually, Johannes who's the founder of Prisma, he made me aware of it that TypeScript even exists, so I looked into it. First, I had I would say quite strong resistance to it because once you ... It feels a little bit like it's taking away your freedom. I'm so free in JavaScript, I can just do what I want. If you are looking a bit more into it, if you're reflecting a bit and thinking, "Okay. Where can this really help me?", you are step-by-step understanding that the compiler is not your enemy, but your friend, and just really protects you from your own stupidity basically. We are just humans. It doesn't matter how good of a programmer you are, you will do these mistakes and TypeScript really helps. Since 2015, I have not used anything else anymore. Here, I really have to site a colleague Ryan from Prisma recently tweeted if he is not writing code in TypeScript anymore, it feels like going outside without clothes. It's really like something is missing. It's like the safety net, the safety layer somehow missing. I am basically someone who converted from JavaScript as my religion to now TypeScript, both in nodes and in the front end and using it four or five years. Jeremy: Awesome. I've been programming in JavaScript for 23 years. Tim: Okay. Jeremy: Yeah. It was a very difficult change for me. It was a huge mind shift for me, but anyways, all right. I don't typically fool my listeners here, but I think we're going to fool them a little bit because even though this is a serverless podcast, we're going to talk a lot more about TypeScript. Of course, we're going to link it back to serverless here, and maybe we'll start that in the beginning, but there are so many really, really cool things that you can do with TypeScript. If you're building serverless applications, it's going to help you. I'd like to start by maybe just getting your thoughts on why TypeScript is going to be an important thing for serverless. Tim: Yeah. I just checked the stats. New Relic just released a report about which runtime is used in serverless most where the New Relic product is activated, and over 50% is using Node off the Lambda runtimes. It's clear. Node is the majority here. I would now claim if you do Node, you should do TypeScript. It's quite relevant to say most of them are using Node and in Node instead of having it on type in JavaScript, I think it's really useful to use TypeScript. Now is the question really why is that so useful, why should you do that. Maybe a quick introduction again or reminder what is TypeScript. Rather a reminder because I think most of the people know it already or know that it exists. There was the State of JS report 2019 where they asked, "Did you ever hear about TypeScript?" 58% heard about it and want to use it again, and I think only less than 8% haven't heard about it yet. Jeremy: Right. Tim: I guess most people have heard about it, but the question is really what is it. I would say you can define TypeScript as a super set of JavaScript. The JavaScript syntax, what you can express with JavaScript is a subset, so that means everything you can do in JavaScript you can also do in TypeScript. That was one of the goals upfront when they designed TypeScript. You need to be able to in hindsight be able to type any program you have written in JavaScript with TypeScript. You need to be able to put the types on top. Why is this so in...

Episode metadata supplied by the publisher feed · Published Jan 11, 2021

Embed this episode

On this episode, Jeremy chats with Tim Suchanek about why serverless developers should think about TypeScript, the benefits of type safety, how to equate TypeScript features with existing programming paradigms, how it can benefit edge computing, and much more.

Distinct summary based on available episode metadata or transcript content.

Ready to play

Episode #83: Serverless and TypeScript with Tim Suchanek

0:00 1:00:58

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

Evolving with Georgia May Georgia May Change is the only constant. Evolving explores the beauty and uncertainty of self-discovery. This podcast is a space for learning and unlearning, shedding old layers, leaping into transformation and embracing the unknown. There is no final destination. This show is for those who are committed to the lifelong journey of discovery; it's time to reinvent yourself, while simultaneously returning to who you’ve always been. Note: This podcast was previously known as Life Chats, where well-known and everyday individuals shared their real life stories, hosted by journalist Georgia May. Enjoy the catalogue of inspiring episodes! This Social Cottage Gemma Watts Welcome to This Social Cottage: the podcast for business owners, content creators, experts and solopreneurs who want to grow on Instagram, sell their offers daily, and still have time for the life they actually want to live. Hosted by ex-teacher and Instagram strategist and offer strategist Gemma, each episode is packed with strategy, content clarity, and sustainable growth tips to help you build an online presence without being exhausted by it. Whether you’re: Just getting started with posting and feeling overwhelmed, Already creating content but it’s taking forever, or Craving a sustainable way to sell your expert offers daily... This podcast is your space. You’ll hear solo episodes full of no-fluff Instagram growth tips, content creation strategies, and ways to show up as the expert you already are — even when life is chaotic and motherhood is... motherhood-ing. Plus, guest chats with women who are doing business with heart, clarity, and Autistic Voices Evalynne Charmer - Autistic Voices Autistic Voices is an authentic and insightful podcast series that explores the world of autism and neurodiversity through the voices of those who know it best - autistic individuals. Join therapist and fellow autist, Evalynne Charmer, as she chats with guests about their experiences with autism and rethinks common misconceptions about neurodiversity. From challenges to triumphs, each episode of Autistic Voices provides a unique perspective on autistic lives. Tune in now to hear these authentic autistic voices! Choosing Change Podcast Lizzie Moult The Choosing Change podcast reveals our greatest life lessons and the small adjustments we make that have a big impact on our life. Hosted by Lizzie Moult, an Aussie cognitive behavioural therapist living in the Scottish Highlands. She chats with incredible people who share their challenges and personal experiences. Whether you're looking for a boost of inspiration, or practical tips to help you create a more fulfilling life, the Choosing Change podcast has something for you. It's your choice, ordinary or extraordinary.#choosingchangepodastwww.choosingchangepodcast.co.ukwww.lizziemoult.com/podcast

Frequently Asked Questions

How long is this episode of Serverless Chats?

This episode is 1 hour and 0 minutes long.

When was this Serverless Chats episode published?

This episode was published on January 11, 2021.

Can I download this Serverless Chats episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!