title: TypeScript: Property does not exist on type '{}'
body: <p>I am using Visual Studio 2013 fully patched. I am trying to use JQuery, JQueryUI and JSRender.  I am also trying to use TypeScript. In the ts file I'm getting an error as follows:</p>
  <blockquote>
  <p>Property 'fadeDiv' does not exist on type '{}'.</p>
  </blockquote>
  <p>I think I have the correct references for JQuery, JQueryUI and JSRender for TypeScript, but from what I've read this is looking like a d.ts issue.</p>
  <p>There are no errors in JavaScript, but I don't want to have Visual Studio saying there are errors if I can help it.  Both times <code>fadeDiv</code> is mentioned in the JavaScript there is a red line under it and both errors say the same thing as above.</p>
  <pre><code>/// &lt;reference path=&quot;../scripts/typings/jquery/jquery.d.ts&quot; /&gt;
  /// &lt;reference path=&quot;../scripts/typings/jqueryui/jqueryui.d.ts&quot; /&gt;
  /// &lt;reference path=&quot;typings/jsrender/jsrender.d.ts&quot; /&gt;
  
  var SUCSS = {};
  
  $(document).ready(function () {
     SUCSS.fadeDiv();
  });
  
  SUCSS.fadeDiv = function () {
  var mFadeText: number;
  $(function () {
      var mFade = &quot;FadeText&quot;;
      //This part actually retrieves the info for the fadediv
      $.ajax({
          type: &quot;POST&quot;,
          //url: &quot;/js/General.aspx/_FadeDiv1&quot;,
          url: &quot;/js/sucss/General.aspx/_FadeDivList&quot;,
          //data: &quot;{'iInput':&quot; + JSON.stringify(jInput) + &quot;}&quot;,
          contentType: &quot;application/json; charset=utf-8&quot;,
          dataType: &quot;json&quot;,
          error: function (xhr, status, error) {
              // Show the error
              //alert(xhr.responseText);
          },
          success: function (msg) {
              mFadeText = msg.d.Fade;
              // Replace the div's content with the page method's return.
              if (msg.d.FadeType == 0) {//FadeDivType = List
                  var template = $.templates(&quot;#theTmpl&quot;);
                  var htmlOutput = template.render(msg.d);
                  $(&quot;[id$=lblFadeDiv]&quot;).html(htmlOutput);
              }
              else {//FadeDivType = String
                  $(&quot;[id$=lblFadeDiv]&quot;).html(msg.d.FadeDivString);
              }
          },
          complete: function () {
              if (mFadeText == 0) {
                  $(&quot;[id$=lblFadeDiv]&quot;).fadeIn('slow').delay(5000).fadeOut('slow');
              }
          }
      });
  });
  </code></pre>
  <p>For those who might read this later, the SUCSS is the namespace. In typescript it appears I would have wanted to do something like this.</p>
  <pre><code>$(document).ready(function () {
      SUCSS.fadeDiv();
  });
  module SUCSS {
      export function fadeDiv () {};
  };
  </code></pre>
  <p>So the function is made public by use of the export and I could call the <code>SUCSS.fadeDiv</code> to run on page load by calling it with the <code>SUCSS.fadeDiv();</code>. I hope that will be helpful.</p>