I am working on an Angular application and I have a requirement to develop an API for a third-party JavaScript that will be injected dynamically.
public class MyApi{
public callSomeFunction():void{...}
public getSomeValue():any {...}
}
var publicApi = new MyApi();
Can someone guide me on how to make the publicApi
object accessible in the global scope of JavaScript?