Make Typescript warm me if i'm using an optional interface field

前端 未结 0 1517
广开言路
广开言路 2020-11-21 22:50

Suppose the following code in Typescript:

interface User {
    name: string,
    surname?: string 
}

const user1: User         


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