- Published on
TotalTypescript - Use assertion functions inside classes
- Authors
- Name
- Lucas Floriani
- @lucasfloriani13
TotalTypescript - Use assertion functions inside classes
TotalTypescript - Use assertion functions inside classes
Assert functions are a useful way that Typescript provide us to affirm that some values exists when the Typescript runtime doesn't catch it automatically.
In this case bellow we assert inside of the this of the class that when we run this method the loggedInUserId
will have a value of string.