title: Calling a TypeScript class method from a ASP.NET MVC view
body: <p>I have a TypeScript class like the following</p>
  
  <pre><code>export class A
  {
       myFunc(n : number){
           alert(n);
       }
  }
  </code></pre>
  
  <p>I need to render an attribute on my select element onchange event so it will call the TypeScript class method. </p>
  
  <pre><code>writer.AddAttribute(HtmlTextWriterAttribute.Onchange,
             string.Format("javascript:new A().myFunc({0})", this.Number));
  </code></pre>
  
  <p>My question is how can I find the exact definition so I will be able to render a proper call to the TypeScript function?</p>
  
  <p>This is how the compiled js looks like...</p>
  
  <pre><code>define("app", ["require", "exports", "jquery"], function (require, exports, $) {
     "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
  
      function myFunc(rsw_id) {
         alert(rsw_id);
      }
  });
  </code></pre>