Returning ES6 Proxy from the ES6 class constructor : <p>I want user to only set specific properties to an object but as the same time that object should be constructed from custom class.</p>

<p>For example</p>

<pre><code>var row = new Row({
  name : 'John Doe',
  email : 'uhiwarale@gmail.com'
}, Schema);
</code></pre>

<p><code>row</code> can have methods. But when user is trying to set <code>row.password</code>, they are not allowed.</p>

<p>One way to do it is using <code>new Proxy</code> instead of <code>new Row</code> but then we will loose all cool things we are doing inside <code>Row</code> class. I want <code>new Row</code> to return a proxy object with <code>this</code> reference as a target of proxy.</p>

<p>Anybody have any ideas on this? If you know <code>mongoose</code>, how <code>mongoose</code> is doing it?</p>
