November 2019
Beginner
804 pages
20h 1m
English
Type aliases are custom types defined using the type keyword:
type Thing = { name: string description: string};// usage:const myThing: Thing = { name: "Computer", description: "A thing that can perform calculations"};
As you saw earlier, the Thing type can be used easily to enforce the presence of specific properties/functions on an object.
Read now
Unlock full access