TypeScript set和get
settypescript get
2023-09-27 14:25:33 时间
class Person {
constructor() {
}
private _name:string;
public get name():string{
return this._name;
}
public set name(name:string){//不能定义返回类型,如: ":void"
this._name = name;
}
}
相关文章
- spring list map set
- set -- $variable
- C++:map和set的认识和简单使用/关联式容器
- [JS] ECMAScript 6 - Set & Map : compare with c#
- CodeIgniter 错误: In order to use the Session class you are required to set an encryption key
- All shortest paths between a set of nodes
- 2022-08-05 粗糙集Rough set
- Amazon Interview | Set 27
- Codeforces #250 (Div. 2) B. The Child and Set
- oracle 字符集扫描工具Character Set Scanner
- halcon-dev_set_draw定义区域的填充模式