true as false type assertion in TypeScript

Viewed 287

In TypeScript, why is the following code considered valid (doesn't throw a compiler error):

const bool = true as false;

I'm wondering about both implementation-wise and as a language design decision?

0 Answers
Related