how to use JavaScript file(function) in typescript.
//abc.js
function Abc(){
alert();
}
//test.ts
now how to use Abc()
function in typescript
how to use JavaScript file(function) in typescript.
//abc.js
function Abc(){
alert();
}
//test.ts
now how to use Abc()
function in typescript
A very simple solution:
declare var Abc: any;
Abc();
A simple solution:
lib.ts
export default class Lib {
public Abc() {
alert();
}
}
main.ts
import Lib from "./lib"
var lib = new Lib();
lib.Abc();