From e31fe92c3afeea1bbcac4381d290e75e5b3ab6e3 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Sat, 29 Jun 2024 21:46:59 +1000 Subject: [PATCH] Update type-assertion.md --- docs/types/type-assertion.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/types/type-assertion.md b/docs/types/type-assertion.md index a052263a..abb754b1 100644 --- a/docs/types/type-assertion.md +++ b/docs/types/type-assertion.md @@ -82,6 +82,9 @@ var foo: Foo = { In some cases you might need to create a temporary variable, but at least you will not be making (possibly false) promises and instead relying on the type inference to do the checking for you. ### Double assertion + +> [Pro Video Lesson on Double Assertion](https://www.booleanart.com/course/typescript/double-assertion) + The type assertion, despite being a bit unsafe as we've shown, is not *completely open season*. E.g. the following is a very valid use case (e.g. the user thinks the event passed in will be a more specific case of an event) and the type assertion works as expected: ```ts