title: Unexpected token; 'constructor, function, accessor or variable' expected
body: <p>Sorry for the newbie question, but I am trying to learn type script.</p>
  
  <p>I have the following class</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class indexGridFunctions
  {
  
      //Error on the var
      var blocksPerRow: (windowWidth:number)=&gt;number
      = function (windowWidth)
      {
          return Math.floor(windowWidth / 12);
      };
  
      var blocksPerColumn: (windowHeight: number) =&gt; number
      = function (windowHeight)
      {
          return Math.floor(windowHeight / 17);
      };
  
      shirtsToDisplay: () =&gt; number
      = function ()
      {
          return blocksPerRow * blocksPerColumn;
      };
  
  } </code></pre>
  </div>
  </div>
  </p>
  
  <p>I am getting an error at the first var. the error is "Unexpected token; 'constructor, function, accessor or variable' expected".</p>
  
  <p>What am I doing wrong?</p>
  
  <p>TIA</p>