declare all property in object the same type in typescript?

后端 未结 0 1727
失恋的感觉
失恋的感觉 2020-12-15 13:01

I know I can declare type for object like so in typescript:

interface PersonType {
    fname: string
    lname: string
}
const person: PersonType = {fname:&qu         


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