093 Learning TypeScript Chapter 6 Arrays with Josh Goldberg
Вставка
- Опубліковано 18 вер 2024
- Arrays and tuples
One flexible and one fixed
Choose your adventure
In this chapter, you worked with declaring arrays and retrieving their members:
• Declaring array types with []
• Using parentheses to declare arrays of functions or union types
• How TypeScript understands array elements as the type of the array
• Working with ... spreads and rests
• Declaring tuple types to represent fixed-size arrays
• Using type annotations or as const assertions to create tuples
What’s a pirate’s favorite data structure?
Arrrrr-ays!