title: TypeScript - Unable to create a "delete" function outside of a class
body: <p>The problem I'm facing is that I am unable - outside of a class definition - to create functions with names that are the same as keywords.</p>
  
  <p>This same "issue" occurs with other keywords, but <code>delete</code> is the keyword of interest here.</p>
  
  <p>THIS WORKS:</p>
  
  <pre><code>    class WebServiceInterface {
          create(): void { }
          retrieve(): void { }
          update(): void { }
          delete(): void { }
      }
  </code></pre>
  
  <p>Notice that I have a function member named "delete".</p>
  
  <p>BUT THIS DOES NOT WORK:</p>
  
  <pre><code>    class WebServiceInterface {
          create(): void { }
          retrieve(): void { }
          update(): void { }
          delete(): void { }
      }
  
      module Web {
  
          var defaultInterface = new WebServiceInterface();
  
          export function create() { defaultInterface.create(); }
          export function retrieve() { defaultInterface.retrieve(); }
          export function update() { defaultInterface.update(); }
          export function delete() { defaultInterface.delete(); }
      }
  </code></pre>
  
  <p>The <code>delete</code> portion of <code>export function delete</code> causes these errors:</p>
  
  <ul>
  <li>Identifier expected.</li>
  <li>Expression expected.</li>
  <li>';' expected.</li>
  </ul>
  
  <p>Is there a fundamental reason why this couldn't/shouldn't be allowed? Is this perhaps just something that needs to be implemented in the language? Is there another way to achieve this?</p>
  
  <hr>
  
  <p>For reference, I'm using TypeScript 1.4 inside of Visual Studio 2013.</p>