utility types

Typescript supports utility types that allow to transform a type into another type. For example:

  • Set all properties of Todo to optional with Partial<Todo>

  • Omit a property id from Todo with Omit<Todo, 'id'>

  • Pick a set of properties from Todo with Pick<Todo, 'id' | 'name'>

    Would you like to connect? Subscribe via email or RSS , or follow me on Twitter!