Object Types

Object Types
πŸ‘¨β€πŸ’Ό We're repeating the same object shape in a few places. Let's give that shape a name so we can reuse it.
🦺 A type alias lets us name an object type. We'll go deeper on type aliases in the Type Safety workshop, but this small intro will make later steps easier.
🐨 Open
index.ts
and:
  1. Create a Task type alias with id, title, and completed
  2. Create two task objects using that type

Please set the playground first

Loading "Object Types"
Loading "Object Types"
Login to get access to the exclusive discord channel.
Loading Discord Posts