How to tell typescript that map.get will always return a value?

后端 未结 0 1558
时光说笑
时光说笑 2021-01-24 02:15

I this have code to make sure that [key, value] pair exist in map

if (map.has(key)) { 
    map.get(key).propertyInValue = getSomething()         


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