Module is not defined error while trying to call function in typescript file
<p>Sample code : Index.ts file which has reference of sample.ts</p>

<pre><code>/// &lt;reference path="sample.ts" /&gt;
var s: sample.Calculate = new sample.Calculate(5, 5); -- error thrown
s.alertme();
</code></pre>

<blockquote>
  <p>Sample.ts file : </p>
</blockquote>

<pre><code>    module sample {
     export class Calculate {
        constructor(public x: number, public y: number) {
            console.log(x + y);
        }

        alertme() {
            alert('ok');
        }
    }
}
</code></pre>

<blockquote>
  <p>Getting following error where i am calling calculate function :
  <a href="https://i.stack.imgur.com/hLq77.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hLq77.png" alt="enter image description here"></a></p>
</blockquote>

<p>PS: I am using visual studio 2015.
HTML:</p>

<pre><code>    @{
    ViewBag.Title = "Home Page";
}

&lt;div class="jumbotron"&gt;
    &lt;h1&gt;MVC&lt;/h1&gt;
    &lt;p class="lead"&gt;ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.&lt;/p&gt;
    &lt;p&gt;&lt;a href="http://asp.net" class="btn btn-primary btn-lg"&gt;Learn more &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;div class="row"&gt;
    &lt;div class="col-md-4"&gt;

    &lt;/div&gt;
&lt;/div&gt;
@section scripts{    
    &lt;script src="~/Scripts/typings/Index.js"&gt;&lt;/script&gt;
}
</code></pre>