how about introducing a well known concept in JS as `own` ? ```js class Person { static name String: "A person name" own name String: "anonymous" own items Array: []
constructor(name) { if (name) this.name = name; } } var anon = new Person, me = new Person('AG'); anon.items; // [] me.items; // [] me.items === anon.items; // false Person.name; // "A person name" anon.name; // "anonymous" me.name; // AG" ``` thoughts? On Tue, Jun 9, 2015 at 7:38 PM, Kevin Smith <zenpars...@gmail.com> wrote: > Also static properties are on __proto__, so it seems a bit strange that >> instance properties would not also be on .prototype. Somewhat of a >> consistency issue I suppose. >> > > Methods declared as "static" in ES6 are defined on the constructor > itself. Apparently, "static" data properties in TS are defined on the > constructor as well. > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss