Issue with InAppBrowserEvent in ionic

I am using ionic2 and with below code I am getting error InAppBrowserEvent does not exist on type of browser

const browser = this.iab.create("someurl", '_blank','location=no');  //If i use this line only it works fine 

			browser.InAppBrowserEvent('loadstart', this.loadStartCallBack);
			browser.InAppBrowserEvent('loadstop', this.loadStopCallBack);
			browser.InAppBrowserEvent('loadstop', this.loadErrorCallBack);

is not a function but a type.

Looking at what you posted, I think you might be looking or https://ionicframework.com/docs/native/in-app-browser/#on

Yes. is there any working example for it. I am not completely sure how to use on function in ionic

InAppBrowserObject.prototype.on

browser.on() in your case.

Can you please elobrate what will be the return type. If you can give one complete example with onloadstart event pls that would be very helpful. All cases I tried are having error

If you have errors, post them instead of telling people to give you other solutions…

Here is an example of how to use on():