ClojureScript doesn't support all that classes sugar. But you can always 
use JS files in your project. They only have to be GCC compatible (ES6 
modules for instance, see 
https://github.com/google/closure-compiler/wiki/ECMAScript6) and on your 
class path.

Herwig example is close, but not exactly what you wanted. Static 
getters/setter have to be defined on constructor itself, not on its 
prototype (then they are instance props).

On Friday, December 28, 2018 at 1:48:22 AM UTC+1, Philos Kim wrote:
>
> The third party JS library I use requires implementing the static getter 
> method of ES6.
>
> Could anyone tell me how I can implement the following simple code in 
> ClojureScript? 
>
>
> class Person{
>   constructor(){
>     this._name = 'jack';
>   };
>
>   static get name(){
>     return this._name;
>   }
>
>   static set name(val){
>     this._name = val;
>   }
> }
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to