Created
August 29, 2019 08:57
-
-
Save tkssharma/2e0a6de5db0c170a10606209a3f5ae23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Object = { | |
x : 90 | |
} | |
Object.defineProperty(Object,'getVal',{ | |
get : function(){ | |
return this.x; | |
}, | |
set : function(x){ | |
this.x = x; | |
}, | |
enumerable : true, | |
configurable : true | |
}) | |
class Hello { | |
private _x: String = null; | |
get Message(){ | |
return this._x; | |
}; | |
set Message(x){ | |
this._x = x | |
}; | |
} | |
var Hello =/* class */ (function(){ | |
function Hello(){ | |
this._message = null | |
} | |
Object.defineProperty(Hello.prototype,'Message',{ | |
get : function(){ | |
return this._message | |
}, | |
set : function(msg){ | |
this._message = msg; | |
}, | |
enumerable : true, | |
configurable : true | |
}) | |
return Hello; | |
}()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment