title: Nativescript super and typescript
body: <p>I included all the typescript source in my nativescript project, and webstorm compiled one of them, now I can't run the app.</p>
  
  <p>I looked at the settings in the grunt file, which I have matched.</p>
  
  <p>In timer.ios.ts the line looks like</p>
  
  <pre><code>    return &lt;TimerTargetImpl&gt;super.new();
  </code></pre>
  
  <p>Which compiles to (in WebStorm using typescript 1.4)</p>
  
  <pre><code>    return super.new.call(this);
  </code></pre>
  
  <p>However the (ts generated) code from tns create is  </p>
  
  <pre><code>    return _super.new.call(this);
  </code></pre>
  
  <p>I can't find the difference with my typescript settings vs the ones in the grunt file.</p>
  
  <p>I can't run it because I get</p>
  
  <p>/app/tns_modules/timer/timer.js:17: JS ERROR SyntaxError: Unexpected use of reserved word 'super'</p>
  
  <p>I can fix it, but I would like to understand why I'm getting different code out of typescript.</p>
  
  <p>Appreciate any help.</p>
  
  <p>(Update)</p>
  
  <p>Looking at the code that is causing the issue</p>
  
  <pre><code>class TimerTargetImpl extends NSObject {
      static new(): TimerTargetImpl {
          return &lt;TimerTargetImpl&gt;super.new();
      }                        
  &lt;snip&gt;
  </code></pre>
  
  <p>It's using super in a static function, since it's static there is no instance so no super.</p>
  
  <p>It seems like this new function should just be</p>
  
  <pre><code> static new(): TimerTargetImpl {
          return new TimerTargetImpl();
      }                        
  </code></pre>