I'm learning how to use openlayers along with Angular 6, but one of the .on's OL event functions is not recognized by TS, is there any other way to do it without being in the conventional way?
this.imagery.on('postcompose', function(event: ol.render.Event){
console.log("postcompose");
var ctx = event.context;
ctx.restore();
});
It points to error
Type '(event: Event) => void' is not assignable to type '(evt: Event) => boolean'.
Types of parameters 'event' and 'evt' are incompatible.
Type 'ol.events.Event' is not assignable to type 'ol.render.Event'.
If I use the event it usually does not have the context property I need ...