Expose method from class

How do we expose a method from a class

For instance expose the refreshUI method so that I can use the method from chrome console or native device

export class DetailPage {

refreshUI() {....}

}


So I can maybe call DetailPage.refreshUI from Chrome Dev console

tried attach a method to window from outside of the class defination like this

(<any>window).refreshUI = function(){ }

where I can see freshUI() now globally but I’m now outside of the detailPage class and I can no longer use any variables/classes within detailpage class

Nobody knows? :confused: