Articles



Uses for the TypeScript ‘as’ assertion

Mar 9, 2023

🕑
about a minute read
📖
Article
In TypeScript there is a as assertion. There are two reasons for this annotation. Firstly it's a way to tell TypeScript that a value is of a certain type which differs from what is being inferred, or has already been set. Essentially, it's used to tell Ty...