Why does this typescript typeguard not work

后端 未结 0 350
滥情空心
滥情空心 2020-11-29 02:03

I have the following code

const validProtocols = ["https", "http"] as const
type AllProtocols = typeof validProtocols
type Protocol = AllP         


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