How to change a variable type in TypeScript without rewriting the variable?

前端 未结 0 945
眼角桃花
眼角桃花 2021-01-15 07:36

I\'m wondering if there is a way to help the TS compiler by specifying a more specific variable type.

I\'m looping over an array of elements that can be anything.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题