Babylon.js icon indicating copy to clipboard operation
Babylon.js copied to clipboard

An error occurs when 'const' is added to the enum export and the tsconfig.json setting is 'isolatedModules': true'.

Open wisdomstar94 opened this issue 7 months ago • 0 comments

Commit that caused the problem

https://github.com/BabylonJS/Babylon.js/commit/a6dc77a5c1cbab71b4ba8559bb5d8269a0bda811

Description

  1. Suppose that the options for tsconfig.json are.
    image
  2. The typecript displays an error when using the PhysicsMotionType enum as follows.
    image


I don't think it's a good idea to simply modify the option "isolatedModules" to false, for example, because Next.js, a much-used framework, recommends using the option "isolatedModules" as true.

This is my personal opinion and I would like to hear from the contributors.

wisdomstar94 avatar Jun 30 '24 02:06 wisdomstar94