I encountered an error while trying to import a Vanilla JavaScript library into an Angular 6 component. Can you please provide me with some guidance on how to resolve this issue?
This is the syntax I used to import the library:
import * as ExistingLibrary from 'app/main/libs/ExistingLibrary.js';
ExistingLibrary.doJob is not a function
The external JavaScript library, ExistingLibrary.js:
var ExistingLibrary = new (function () {
this.doJob = doJob;
function doJob(template, options) {
function f1(template, options) {}
function f2(template, options) {}
});