Type Assertions and Type Casting - Typescript Tutorial for Beginners

Type Assertions and Type Casting - Typescript Tutorial for Beginners

Dave Gray via YouTube Direct link

Intro

1 of 17

1 of 17

Intro

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Type Assertions and Type Casting - Typescript Tutorial for Beginners

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Intro
  2. 2 Welcome
  3. 3 Type Assertions vs Type Casting
  4. 4 What are Type Assertions?
  5. 5 Starter Code
  6. 6 Converting Types with Assertions
  7. 7 Angle Bracket Syntax instead of "as"
  8. 8 Narrowing Return Values with Assertions
  9. 9 Caution: Assertions allow mistakes!
  10. 10 Double Casting and the unknown type
  11. 11 DOM Selection Types
  12. 12 Non-Null Assertions
  13. 13 Angle Brackets and the DOM
  14. 14 Student Challenge
  15. 15 Solution 1: Beginners
  16. 16 Solution 2: Type Assertion
  17. 17 13:50 Syntax error: document.getElementById'img' is what is needed if the element has an id set to "img". This does not change the concept I'm discussing. Just tired eyes and a syntax error.

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.