Invalid built-in type declarations in 5.8.0

In the new 5.8.0 release, the included type declarations for TypeScript are invalid and throw an error in Typescript >=4.5 (tested 4.5, 4.6, and 4.7).

Error is as follows:

../../node_modules/@babylonjs/core/Engines/engine.d.ts(2296,7): error TS2720: Class 'GPUOutOfMemoryError' incorrectly implements class 'GPUError'. Did you mean to extend 'GPUError' and inherit its members as a subclass?
  Types have separate declarations of a private property '__brand'.
../../node_modules/@babylonjs/core/Engines/engine.d.ts(2302,7): error TS2720: Class 'GPUValidationError' incorrectly implements class 'GPUError'. Did you mean to extend 'GPUError' and inherit its members as a subclass?
  Types have separate declarations of a private property '__brand'.

The error is correct in that it appears the classes in question implement their parent class rather than extending. Interestingly, though, those types don’t appear to be used anywhere and the problem can be worked around by removing the two types in question completely.

1 Like

This has been fixed last week, @RaananW would you mind releasing a new version today ?

1 Like

i’m releasing a new version in an hour

1 Like