JSNation US 2024
103 min
Advanced TypeScript for Bun and Node.js
Workshop
Learn the full potential of TypeScript by using advanced features like Type Inference, Type Guards, Generics, Transformers, and Utility Types with asynchronous programming in both Node.js (using Express.js) and Bun.js (using Hono.js), all while understanding best practices for building strongly typed APIs with different databases.OverviewIn this workshop, we’ll kick off with a discussion on the recent updates in Node.js and Bun.js, focusing on their built-in TypeScript support. You'll learn how to set up TypeScript in both runtimes and create strictly typed APIs using Express.js and Hono.js. Through hands-on demos, we'll explore integration with various databases like MongoDB and Postgres, leveraging advanced TypeScript features to build robust applications. By the end of the workshop, you'll be equipped with the knowledge to optimize TypeScript code for performance and design patterns, ensuring your APIs are both efficient and maintainable.Learning Goals- Introduction to Node.js’s and Bun.js’s TypeScript support- Advanced TypeScript Features: Generics, Type Guards, Mapped Types, etc.- Middleware and Dependency Injection with Express.js and Hono.js- Design Pattern and Performance Enhancements in TypeScript- Unit and Integration Testing with TypeScript- Database Integration: MongoDB, Postgres, Prisma, and others- Best Practices for Robust API Development in both Node.js and Bun.js