I’m getting a bunch of errors along the lines of: @google/model-viewer-render-fidelity-tools: node_modules/@babylonjs/core/Engines/engine.d.ts(2421,7): error TS2420: Class ‘XRWebGLLayer’ incorrectly implements interface ‘XRLayer’.
@google/model-viewer-render-fidelity-tools: Property ‘prototype’ is missing in type ‘XRWebGLLayer’ but required in type ‘EventTarget’.
@google/model-viewer-render-fidelity-tools: node_modules/@babylonjs/core/XR/native/nativeXRRenderTarget.d.ts(13,14): error TS2416: Property ‘layer’ in type ‘NativeXRLayerWrapper’ is not assignable to the same property in base type ‘WebXRLayerWrapper’.
@google/model-viewer-render-fidelity-tools: Type ‘XRWebGLLayer’ is not assignable to type ‘XRLayer’.
I also tried updating babylon from 5.0 to 5.27, but the errors remain. Is babylon incompatible with the latest TS (at least with strict checks enabled)?
This is probably a discrepancy between the WebXR typing we and they are using. I’ll check the WebXR declaration later today.
Those types are not coming from TS, so it’s not the version of the package. My assumption is that the use is because they are using the @types/webxr, and we use our own custom declaration
Thanks for the quick response! I tried TS v4.6.2, but same problem. v4.3.5 does work, so I’d guess there are just more strict checks that have been added? Does “they” indicate me in this context? I don’t have @types/webxr in this build and I’m not using babylon for anything WebXR related, hence why this feels like more of a core incompatibility. Is there some set of TS checks that need to be disabled to build babylon?
I am getting the exact same error when using babylon-versions 5.20 - 5.24. Did you find the solution? I tried downgrading babylons and ts to different version but I am unable to go down to TS 4.3 as another dep (angular) requires at least 4.6.2.
When I try to update to the most recent version of babylon, this particular error disappears for me but others appear. This might be related, maybe both have a common reason.