How to disable automatic casting to enum number?

Write node.js application using TS. Noticed that I can assign a number to a variable of the enumeration type, although it should require an explicit cast. What compiler option is responsible for this?
June 7th 19 at 14:58
1 answer
June 7th 19 at 15:00
No, it's By Design.
https://github.com/Microsoft/TypeScript/issues/6131
It's to allow patterns such as n = n + 1.

Find more questions by tags TypeScript