title: I want to move the typescript object up one level in the hierarchy
body: <p>I'm using typescript.<br />
  The content of ①props is as follows. I'd like to make it look like ②.<br />
  I want to make the object in ① into the object in ②.</p>
  <pre><code>①
  Test {props: {…}}
    props:
       avatarUrl: &quot;/test.jpg&quot;
        id: 1
        name: &quot;test&quot;
       [[Prototype]]: Object
    [[Prototype]]: Object
  </code></pre>
  <pre><code>②
  Test 
     avatarUrl: &quot;/test.jpg&quot;
     id: 1
     name: &quot;test&quot;
     [[Prototype]]: Object
  </code></pre>
  <pre><code>export class Test {
    readonly id!: number;
    readonly name!: string;
    readonly avatarUrl!: string;
  
    constructor(readonly props: TestProps) {
      zProps.parse(props);
      console.log(props) // ①
      props
    }
  }
  </code></pre>
  <pre><code>export const fetchTest = async (): Promise&lt;Test&gt; =&gt; {
    const { data } = await apiClient.get(&quot;https/test&quot;);
    return new Test({
      avatarUrl: data.avatarUrl,
      id: data.id,
      name: data.name,
    });
  };
  
  </code></pre>