WebXR get XRSession or onExit event

I have seen that before, but it gave me an Error:

Property ‘addEventListener’ does not exist on type ‘WebXRManager’.

Found a workaround for this:

let xr : any = this.renderer.xr

xr.addEventListener('sessionstart', this.onSessionStart.bind(this))

xr.addEventListener('sessionend', this.onSessionEnd.bind(this))

Probably happens because of missing typescript typings.

Thanks @Mugen87