Typescript generic object propery const name get lost after map

前端 未结 0 388
遥遥无期
遥遥无期 2020-11-21 06:23

Is there a way to do it without "as"?

Sandbox.

const names = [\'a\' , \'b\'] as const // readonly ["a", "b"]
type Name =          


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