Using Sweet alert with Typescript class
<p>I have a method inside a typescript class that just looks like this </p>

<pre><code>    var confirmation = confirm("Run Agent Job?");
    if (confirmation) {
        console.log('yes');
    } else {
        console.log('no');
    }
</code></pre>

<p>I'm trying to convert this to use Sweet Alert, so inside the method I just put this. But Typescript doesn't recognize this It throws a <code>Cannot find name swal</code></p>

<pre><code>swal("hello");
</code></pre>

<p>I have imported sweet alert as follows</p>

<pre><code>&lt;link href="~/Content/css/sweetalert.css" rel="stylesheet" /&gt;
&lt;script src="~/Scripts/sweetalert.min.js"&gt;&lt;/script&gt;
</code></pre>

<p>What am I doing wrong? If I try to use <code>swal()</code> in just a plain <code>*.js</code> file, it'll work fine. It's only when it's in a <code>*.ts</code> file.</p>