Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes needed for babel typescript combo #54

Open
paulrobello opened this issue Feb 5, 2019 · 3 comments
Open

changes needed for babel typescript combo #54

paulrobello opened this issue Feb 5, 2019 · 3 comments

Comments

@paulrobello
Copy link

babel typescript does not support "const enum" and "namespace"
removing const from enum and also
refactoring the names in the namespace areas or moving them to their own module is needed to make it compatible.

@mafsays
Copy link

mafsays commented Mar 13, 2019

hey - quick and dirty fix - i just successfully hacked around this for now by changing the const enums to regular enums (I guess this may have a performance overhead?), and refactoring the b2ParticleSystem.ts file to remove the namespace - not using the particle system so can't vouch for that still working at run time but it compiles and my project runs fine!

b2CollideEdge.zip

@flyover
Copy link
Owner

flyover commented Nov 25, 2019

@paulrobello @mafsays Is this still the case? If so, can you provide a PR?

@paulrobello
Copy link
Author

I have not worked the project that needed this since reporting this issue. I have looked around and it seems that babel now supports namespaces however it still does not support "const enum" per Feature Request Add Support for const enum in TS #8741 . Simply removing const from in front of all the enum declarations will make it babel compatible, however that might incur a small performance hit depending on where the enum's are used. It will be a while before I get back to this project so I cant provide a PR any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants