AbstractEngine and Engine conversion issues

This is part of my code, it gives an error in my project:

this.engine = new BABYLON.Engine(this._canvas, true, { premultipliedAlpha: false, preserveDrawingBuffer: true });
    this.scene = new BABYLON.Scene(this.engine);

When I use the purchase agent, I still get an error

    this.scene = new BABYLON.Scene(this.engine as BABYLON.AbstractEngine);


I want to know what I should do, looking forward to your reply

You should cast engine to Engine:

this.engine as BABYLON.Engine

The types should be compatible without issues.

cc @RaananW

would you be able to share the project? or a simple reproduction? would be interesting to see what the issue is. no casting should be needed TBH.