Argument of type 'import("babylonjs/Events/pointerEvents").PointerInfo' is not assignable to parameter



typescript : 3.9.7;
bjs: 4.2.0
error report

Argument of type 'import("babylonjs/Events/pointerEvents").PointerInfo' is not assignable to parameter of type 'BABYLON.PointerInfo'.
  The types of 'pickInfo.pickedPoint.toQuaternion().equals' are incompatible between these types.
    Type '(otherQuaternion: import("babylonjs/types").DeepImmutableObject<import("babylonjs/Maths/math.vector").Quaternion>) => boolean' is not assignable to type '(otherQuaternion: BABYLON.DeepImmutableObject<BABYLON.Quaternion>) => boolean'.
      Types of parameters 'otherQuaternion' and 'otherQuaternion' are incompatible.
        Type 'BABYLON.DeepImmutableObject<BABYLON.Quaternion>' is not assignable to type

In my ts project the code snippets report this error but perform normal in blow playground,am I did something wrong?

BABYLON.something are imported as immutable object.

remove BABYLON. in your code and import the proper dependencies (ctrl + shit + ; on Vscode)

2 Likes

Exactly what @Dreadbond said, you are mixing the usage of the umd named module and import creating the conflict for your transpiler.

1 Like

sorry to so late reply, you are correct. I should keep the consistent of import way.

1 Like