📜  ts 类 - TypeScript 代码示例

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

代码示例2
class Greeter {  greeting: string;
  constructor(message: string) {    this.greeting = message;  }
  greet() {    return "Hello, " + this.greeting;  }}
let greeter = new Greeter("world");Try