So, here is my code so as you can see newUser has got its property from User and is also a constant. So why does Typescript let it use the push function of arrays to push a boolean value - "True" inside the type alias when the structure restrict its?
javascript - Why is typescript not restricting the type alias to adhere to it structure? - Stack Overflow
评论列表(0)
- 暂无评论