TypeScript Associate — Easy
Key points
- `as const` helps TypeScript narrow down the type of the value to its most specific literal type.
- This assertion is useful for ensuring that variables are treated as constants with specific values.
- It does not convert the value to a constant at runtime or make the variable immutable in JavaScript.
Ready to go further?
Related questions
