TypeScript set和get
摘要:
class Person { constructor() { } private _name:string; public get name():string{ return this._name; } public set name(name:string){//不能定义返回类型,如: ":voi 阅读全文
posted @ 2020-12-04 18:01 kingBook 阅读(1201) 评论(0) 推荐(0) 编辑