Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

TypeScript: Tips and Tricks

via egghead.io

Overview

Learn to use some of the tips and tricks that can help you write better TypeScript.
We'll look at some utility types, understand how immutable types work, learn how to use conditional types, and finally go through some examples to see how we can write them better.
This collection is a must-watch for those unfamiliar with TypeScript and wanting to learn some skills that make types in TypeScript easy.

Syllabus

  • Use Partial to Create Partially Fillable Types in TypeScript
  • Make your optional fields required in TypeScript
  • Create a Type with Some Fields of Another Type in TypeScript with Pick
  • Exclude Properties from a Type in TypeScript
  • Create Immutable Types in TypeScript
  • Ignore Null or Undefined Values with TypeScript Non-Null Assertion Operator
  • Create Type From Any Given Data in TypeScript
  • Create Dynamically Typed Strings Using Template Literal Types
  • Create Class Properties using Constructor Assignment
  • Avoid errors using unknown type
  • Create mapped types using Record type
  • Reduce duplicate types with Generic Types

Taught by

Kamran Ahmed

Reviews

4.6 rating at egghead.io based on 304 ratings

Start your review of TypeScript: Tips and Tricks

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.