YoVDO

Domain Data Modeling using TypeScript Aliases, Brand Types and Value Objects

Offered By: egghead.io

Tags

Typescript Courses Type System Courses

Course Description

Overview

The reason we use TypeScript is so that it can catch inadvertant bugs you or your teammate will inevitable make whether that's passing the wrong prop to a component or assuming the data coming in is of a certain type (or there at all!). Simply using TypeScript and it's primitive types isn't enough to stop sneaky bugs from pestering you. e.g. you wouldn't treat an email and a user Id that are both strings the same way, even though TypeScript wouldn't differentiate the two. As your project matures, you need a type system that will mature with it so you can be confident in the code you ship. This course addresses your code from a data modeling perspective and gives you tools to incrementally build models that make sense for your application. You can introduce each pattern step by step and maximize the benefits you get from them.

Syllabus

  • Understand the Downsides of Overusing Primitive Types
  • Simplify TypeScript code Maintenance with Type Aliases
  • Preserve Displaying TypeScript Type Alias Names
  • Improve Readability by Annotating Types with JSDoc
  • Provide Single Source of Truth for TypeScript Types using Lookups
  • Make Primitive Types Incompatible using Typescript Structural Typing
  • Validate Brand Typed Expressions with Custom Type Guards
  • Create and Effectively Use TypeScript Brand Types
  • Restrict Available Operations on Values using Value Objects
  • Evolve your Data Model with Aliases, Brand Types and Value Objects

Taught by

Tomasz Ducin

Related Courses

Angular 17
LearnQuest via Coursera
Automated Reasoning with GPT Assistant API: ReAct Agents
Coursera Project Network via Coursera
Becoming a 10X Developer Using Amazon CodeWhisperer (Korean)
Amazon Web Services via AWS Skill Builder
Build a simple company expense tracker with Typescript
Coursera Project Network via Coursera
Build ATM User Interface using Routing in Angular
Coursera Project Network via Coursera