How to build a TypeScript class constructor with object defining class fields? : <p>In TypeScript it's possible to create a class with a constructor that takes parameter with access modifiers and it automatically convert those parameters in class fields.</p>

<pre><code>class Item {
  constructor(
    public id: number,
    public updatedAt: number,
    public createdAt: number,
  ) {}
}

const item = new Item(1, 1, 1);
item.id // 1
</code></pre>

<p>I'm wondering if there is a way to pass all those parameters in an object instead</p>

<pre><code>class Item {
  constructor({
    public id: number,
    public updatedAt: number,
    public createdAt: number,
  }) {}
}

const item = new Item({ id: 1, updatedAt: 1, createdAt: 1 });
item.id // 1
</code></pre>

<p>Is this possible? Ever gonna be possible?</p>

<p>Are there workarounds to do something similar?</p>
