title: TypeScript: Set Object.prototype with spread operator
body: <p>Using the spread operator is a succinct way to compose an object consisting of an aggregation of other objects' properties. </p>
  
  <p>But is there succinct and performant way to set the prototype of an object with the spread operator? </p>
  
  <p>Currently I have: </p>
  
  <pre><code>const result = Object.assign(Object.create(EmailCampaign.prototype), properties) 
  </code></pre>
  
  <p>. . . which spreads the properties returned from a database query into an object with the <code>EmailCampaign</code> prototype. Is there a way to set the object prototype with the spread operator? </p>
  
  <p>This would be possible:</p>
  
  <pre><code>const result = Object.setPrototypeOf({...properties}, EmailCampaign.prototype);
  </code></pre>
  
  <p>. . however it is inadvisable with regards to performance to set the prototype of an object after instantiation. I'm looking for another way, if one exists.  </p>