title: Typescript how to clone object except for one key
body: <p>I have two interfaces. They are really similar except for one key.</p>
  
  <pre><code>interface InitialStateFromDB {
    uploads: {
      companyImage: string,
      map: string
    },
    adminPasswords: string,
    postInfos: PostInfo[] | undefined
  }
  
  interface InitialState extends Omit&lt;InitialStateFromDB, 'adminPasswords'&gt; {
    adminPasswords: AdminPassword
  }
  </code></pre>
  
  <p>And I get initialState from DB.</p>
  
  <pre><code>const initialStateFromDB: InitialStateFromDB = window.__PRELOADED_STATE__;
  </code></pre>
  
  <p>Then I extract value of each property from initialStateFromDB to make initialState.</p>
  
  <pre><code>let adminPasswords: AdminPassword = JSON.parse(initialStateFromDB.adminPasswords);
  const initialState : InitialState = {
    uploads : initialStateFromDB.uploads,
    adminPasswords,
    postInfos: initialStateFromDB.postInfos
  }
  </code></pre>
  
  <p>But I think there is a more simple way to merge except adminPasswords property. So I searched about this.</p>
  
  <p><a href="https://stackoverflow.com/questions/34698905/clone-a-js-object-except-for-one-key">Clone a js object except for one key</a></p>
  
  <p>But, I don't know how to do like that in typescript.</p>
  
  <p>So, My question is that <strong>"How to clone object except for one key in Typescript"</strong></p>