Skip to content

Article from Fatine Benhsain

TypeScript: How Type Guards Can Help You Get Rid of 'as'

January 12, 2022Fatine Benhsain9 min read

TS logo

In TypeScript (TS), the "as" keyword is widely used when manipulating types. However, you should employ it with caution, as it does not provide any guarantee on the real types of your objects and could generate unexpected bugs. In this article, I will go into more detail about “as” and explain how…

Continue reading →