Typescript says array.pop() might return undefined even when array is guaranteed to contain elements

后端 未结 0 1321
攒了一身酷
攒了一身酷 2020-12-31 06:16

Why does Typescript warn me that pop() might return undefined even after I\'ve verified that I\'m removing an element from a non-empty array?

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