How do I add Loading-bar external JS file into my ionic project

Hello I am trying to import this library into my ionic project.

What I did is I copied loading-bar.js and CSSinto my assets folder.Then I added those 2 lines to index.html:

  <link rel="stylesheet" type="text/css" href="assets/loading-bar.css">
  <script type="text/javascript" src="assets/loading-bar.js"></script>

I added this line to ts file of the page that i want to use the library

import * as loading from '../assets/loading-bar';

I added this to html file of page:

  <div id="myItem1"></div>

Then with this code I tried it:

var bar1 = new ldBar("#myItem1");
  var bar2 = document.getElementById('myItem1').ldBar;

This is the error:

you should declare it first .
declare const jQuery:any;
for jquery. and no need to include
"import * as loading from ‘…/assets/loading-bar’;"