Files
shelter.ts
What you'll learn
- Declare an interface with required, optional and readonly properties, and extend it
- Describe an optional method and call it only when it is there
- Explain structural typing: any value with the right shape fits, whatever it is called
Press Run tests to start the app. Its log appears here.Tests
- shelter.spec.tsrun to see its tests