title: calling javascript function from typescript angular 2
body: <p>I am using VS 2015 as my IDE. I have read the following:
  <a href="https://stackoverflow.com/questions/37348166/angular-2-typescript-invoke-javascript-function">Angular 2 typescript invoke javascript function</a></p>
  
  <p>and </p>
  
  <p><a href="https://stackoverflow.com/questions/21544893/using-a-javascript-function-from-typescript">Using a Javascript Function from Typescript</a></p>
  
  <p>and </p>
  
  <p><a href="https://stackoverflow.com/questions/21544893/using-a-javascript-function-from-typescript">Using a Javascript Function from Typescript</a></p>
  
  <p>however, i still don't get the basic.</p>
  
  <p>assuming that i have testing.js
  and app.component.ts</p>
  
  <pre><code>    var testJs = function () {
      this.asd = 123;
  
  }
  
  testJs.prototype.testing = function (param) {
      console.log(param);
  }
  </code></pre>
  
  <p>How do I use testJs in my app.component.ts? at the moment i try this but failed:</p>
  
  <pre><code>import { Component } from '@angular/core';
  interface testJs {
      testing: Function;
  }
  declare var testJs: testJs;
  @Component({
      selector: 'my-app',
      templateUrl: '/mainTemplate.html'
  })
  export class AppComponent {
      testJs.testing("adsf");
  }
  </code></pre>
  
  <p>I have tried the following and it still does not work as well.
  <a href="https://i.stack.imgur.com/x93bg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x93bg.png" alt="enter image description here"></a></p>
  
  <p>and I don't have angular.cli. is it possible to do it without angular.cli?</p>