TypeScript in 50 Lessons — Chapter 2a (8, 9, 10)

Michael Chan ·

Join us this week for lessons 8, 9, and 10 of TypeScript in 50 Lessons. Lessons include:

Come with questions concerns, and curiosity!

This is a short-term community group for owners of the book TypeScript in 50 Lessons. The only requirement is that you own the book.

Notes

Terms

High-level takeaways

// example of unkown, function parameter types, return types, nad type narrowing with type guards
function selectDeliveryAddress(addressOrIndex: unkown): string {
  if(typeof addressOrIndex === 'number' && addressOrIndex < deliveryAddresses.length) {
    return deliveryAddrress[addressOrIndex];
  }
  
  if(typeof addressOrIndex === 'string') {
    return addressOrIndex;
  }
  
  return '';
}

Discussion

Speaker

Join us in Discord
Improve this page on GitHub

Discord Sesh Command

Paste this sesh command into a Discord channel to create a joinable event:

!create TypeScript in 50 Lessons — Chapter 2a (8, 9, 10) on Aug 26, 2021 10:00 AM PST

Title
TypeScript in 50 Lessons — Chapter 2a (8, 9, 10)
Time
Aug 26, 2021 10:00 AM PST
Duration
1hr
Color
React Podcast:
Some Antics:
single-threaded: