title: how to delete a property from an object in Typescript without the operand of a 'delete' operator must be optional error?
body: <p>I have tried to read how to delete a property from an object in here: <a href="https://stackoverflow.com/questions/208105/how-do-i-remove-a-property-from-a-javascript-object">How do I remove a property from a JavaScript object?</a></p>
  <p>it should use <code>delete</code>, I try it like this</p>
  <pre><code>const eventData = {...myEvent}; // myEvent is an instance of my `Event` class
  delete eventData.coordinate; // I have error in here
  </code></pre>
  <p>but I have error like this</p>
  <p><a href="https://i.stack.imgur.com/uDF2g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uDF2g.png" alt="enter image description here" /></a></p>
  <blockquote>
  <p>The operand of a 'delete' operator must be optional.ts(2790)</p>
  </blockquote>
  <p>and then I read this : <a href="https://stackoverflow.com/questions/49590146/typescript-does-not-infer-about-delete-operator-and-spread-operator">Typescript does not infer about delete operator and spread operator?</a></p>
  <p>it seems to remove that error is by changing my tsconfig.json file using</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      ...
       &quot;strictNullChecks&quot;: false, 
      }
      ...
  }
  </code></pre>
  <p>but if I implement this, I will no longer have null checking</p>
  <p>so how to delete a property from an object in Typescript without the operand of a 'delete' operator must be optional error?</p>