Error compiling typescript in babylonjs@5.0.0-rc.4

Recently I have updated from 5.0.0-alpha.5 to 5.0.0-rc.4 and now I get errors compiling the typescript definition babylonjs.module.d.ts

Here are the error details:

32069 _mergeCoroutine(transform: Matrix | undefined, vertexDatas: (readonly [vertexData: VertexData, transform?: Matrix]), use32BitsIndices: boolean | undefined, isAsync: boolean, forceCloneIndices: boolean): Coroutine;
~
node_modules/babylonjs/babylon.module.d.ts:32069:114 - error TS1005: β€˜,’ expected.

32069 _mergeCoroutine(transform: Matrix | undefined, vertexDatas: (readonly [vertexData: VertexData, transform?: Matrix]), use32BitsIndices: boolean | undefined, isAsync: boolean, forceCloneIndices: boolean): Coroutine;
~
node_modules/babylonjs/babylon.module.d.ts:127652:90 - error TS1005: β€˜,’ expected.

127652 _mergeCoroutine(transform: Matrix | undefined, vertexDatas: (readonly [vertexData: VertexData, transform?: Matrix]), use32BitsIndices: boolean | undefined, isAsync: boolean, forceCloneIndices: boolean): Coroutine;
~
node_modules/babylonjs/babylon.module.d.ts:127652:114 - error TS1005: β€˜,’ expected.

127652 _mergeCoroutine(transform: Matrix | undefined, vertexDatas: (readonly [vertexData: VertexData, transform?: Matrix]), use32BitsIndices: boolean | undefined, isAsync: boolean, forceCloneIndices: boolean): Coroutine;

Any idea?

cc @sebavan

I think this is a known issue or am I mistaken?

nope it should have been ok in RC4, @RaananW might confirm ?

@Juan_Pablo_Gonzalez what version of typescript are you using ?

Currenty I am using β€œtypescript”: β€œ~3.9.7”

could you try with ^4.4.4

1 Like

I am having the same issues on typescript 4.5.5

Weird as you can see it fails on 3.9.7 https://www.typescriptlang.org/play?ts=3.9.7#code/CYUwxgNghgTiAEBbA9sArhBAiALl+A3gLABQ858IAHgA7Iw7yRQDOL8AslDjAJZWEAvqQqVa9RszbwAwvWRocvAHYgAPABUAfENIiK1OgybRpANRANqAEW5RC+0eQD6iSwHMQcmAqWqAFDxQyiwAZvSIAFyc3HwCAD7waMqgoSogwAA08ABuljg2dizR-nBQwMjKEACe8ADaeVZUtjhQ0RZNLVDZQSHhMIgA-NFcPPwAugCUdePZaCwgAMwATABCvDgsAJIpvGAgxfAARsjImMHwicmp6VnwvCwAgizVymDRJ2cgwdn9+zIQSogHbAPYHD6nc7KSbRby+dJqDoFZp2LQAbkc8GEJGxQA

but not on 4.4.4 https://www.typescriptlang.org/play?ts=4.4.4#code/CYUwxgNghgTiAEBbA9sArhBAiALl+A3gLABQ858IAHgA7Iw7yRQDOL8AslDjAJZWEAvqQqVa9RszbwAwvWRocvAHYgAPABUAfENIiK1OgybRpANRANqAEW5RC+0eQD6iSwHMQcmAqWqAFDxQyiwAZvSIAFyc3HwCAD7waMqgoSogwAA08ABuljg2dizR-nBQwMjKEACe8ADaeVZUtjhQ0RZNLVDZQSHhMIgA-NFcPPwAugCUdePZaCwgAMwATABCvDgsAJIpvGAgxfAARsjImMHwicmp6VnwvCwAgizVymDRJ2cgwdn9+zIQSogHbAPYHD6nc7KSbRby+dJqDoFZp2LQAbkc8GEJGxQA

or 4.5.5 https://www.typescriptlang.org/play?ts=4.5.5#code/CYUwxgNghgTiAEBbA9sArhBAiALl+A3gLABQ858IAHgA7Iw7yRQDOL8AslDjAJZWEAvqQqVa9RszbwAwvWRocvAHYgAPABUAfENIiK1OgybRpANRANqAEW5RC+0eQD6iSwHMQcmAqWqAFDxQyiwAZvSIAFyc3HwCAD7waMqgoSogwAA08ABuljg2dizR-nBQwMjKEACe8ADaeVZUtjhQ0RZNLVDZQSHhMIgA-NFcPPwAugCUdePZaCwgAMwATABCvDgsAJIpvGAgxfAARsjImMHwicmp6VnwvCwAgizVymDRJ2cgwdn9+zIQSogHbAPYHD6nc7KSbRby+dJqDoFZp2LQAbkc8GEJGxQA

Finally I was able to migrate my project to angular 13 and typescript 4.4.4… and now i get no errors! So it looks like babylon 5.x (no alpha) requires typescript 4.4 or above. Thanks guys!

2 Likes