Perform null Checks with Assertion Functions

Marius Schulz
InstructorMarius Schulz

Share this video with your friends

Send Tweet

In this lesson, we're going to look at how to perform null checks with assertion functions. We're going to assert that a nullable value doesn't hold the value null. In the process, we're going to learn how assertion functions integrate with TypeScript's control flow analysis.

Jon Seidel
Jon Seidel
~ 2 years ago

What version/settings of TypeScript are you using? And/or Prettier? I can't get the asserts typing to work. thanks

Jon Seidel
Jon Seidel
~ 2 years ago

figured it out: parser=typescript for Prettier