title: Bootstrap on Angular 7 getting error as 'Property collapse does not exist on type `JQuery<HTMLElement>`
body: <p>I am trying to close the <code>collapse</code> panel on click outside of the drop down. i try with following code :</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Store, select } from '@ngrx/store';
  declare var $:JQueryStatic;
  import { State } from "./../../state/app.state";
  import * as fromSetupConfig from "./../../setup-config/state/setup-config.reducer";
  
  @Component({
      selector: 'app-header',
      templateUrl: './header.component.html',
      styleUrls: ['./header.component.scss']
  })
  export class HeaderComponent implements OnInit {
  
      constructor(private store:Store&lt;State&gt;) { }
  
      currentName:string;
  
      ngOnInit() {
  
          this.store.pipe(select(fromSetupConfig.getCurrentName)).subscribe(newName =&gt; {
              this.currentName = newName
          });
  
          $(document).click(function(e) {
              if (!$(e.target).is('.panel-body')) {
                  $('.collapse').collapse('hide');      //throws error  
              }
          });
  
      }
  
  }
  </code></pre>
  
  <p>But getting error as error: <code>Property collapse does not exist on type</code>JQuery` - how to fix this?</p>
  
  <p><a href="https://i.stack.imgur.com/AJnPo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AJnPo.jpg" alt="error"></a></p>