title: Unable to add jQuery to an angular cli project
body: <p>I want to use jQuery in my angluar cli project.
  I have tried the instructions here: <a href="https://www.gurustop.net/blog/2016/11/18/3821/jquery-angular2-angularcli-how-to" rel="nofollow noreferrer">https://www.gurustop.net/blog/2016/11/18/3821/jquery-angular2-angularcli-how-to</a></p>
  
  <ol>
  <li><p>Install jQuery</p>
  
  <pre><code>npm install --save jquery;
  </code></pre></li>
  <li><p>Install jQuery type defination for type checking.</p>
  
  <pre><code>npm install --save-dev @types/jquery
  </code></pre></li>
  <li><p>Add refenece of jquery file in "scripts" array inside
  angular-cli.json file.</p>
  
  <pre><code>"scripts": [
     "../node_modules/jquery/dist/jquery.min.js"
  ]
  </code></pre></li>
  <li><p>Import jquery in my app.component.ts file</p>
  
  <pre><code>import { Component } from '@angular/core';
  import * as jQuery from 'jquery';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  export class AppComponent {
    title = 'app';
    test = jQuery("body");
  }
  </code></pre></li>
  </ol>
  
  <p>However, when a do a <code>ng build</code> I get the following error:</p>
  
  <pre><code>ERROR in ./src/app/app.component.ts (2,25): Module ''jquery'' resolves
  to a non-module entity and cannot be imported using this construct.
  </code></pre>
  
  <p>If I remove the <code>import * as jQuery from 'jquery';</code> and `ng build' I get:</p>
  
  <pre><code>ERROR in ./src/app/app.component.ts (10,10): Cannot find name 'jQuery'.
  </code></pre>
  
  <p>Not sure where to go from here.</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>Based on what @Saravana posted.
  If I just do <code>declare const $: JQueryStatic</code> and <code>ng build</code>, I get the error:</p>
  
  <pre><code>ERROR in ./src/app/app.component.ts (2,19): Cannot find name 'JQueryStatic'.
  </code></pre>
  
  <p>but if I do what Saravana suggested on his first post before he deleted it.</p>
  
  <pre><code>import "jquery"; 
  declare const $: JQueryStatic;
  </code></pre>
  
  <p>It builds without complain. So I think Saravana you should revert your post back.</p>