Const Assertions in Literal Expressions in TypeScript

added by JavaScript Kicks
12/16/2019 10:22:22 AM

297 Views

With TypeScript 3.4, const assertions were added to the language. A const assertion is a special kind of type assertion in which the const keyword is used instead of a type name. In this post, I'll explain how const assertions work and why we might want to use them.


0 comments