📜  typescript 静态示例 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:30.186000             🧑  作者: Mango

代码示例1
class Person {

 protected static fullname: string

 public static resultData(): string {
     Person.fullname = "john doe"
     return `My name is ${Person.fullname}`
  }
}

const res = Person.resultData()
console.log(res)