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

ModelToTypeScript: Breaks on object keys with spaces #29

Open
marcustyphoon opened this issue Feb 13, 2024 · 0 comments
Open

ModelToTypeScript: Breaks on object keys with spaces #29

marcustyphoon opened this issue Feb 13, 2024 · 0 comments

Comments

@marcustyphoon
Copy link

marcustyphoon commented Feb 13, 2024

ModelToTypeScript doesn't appear to quote object keys that have spaces in them, resulting in SyntaxError: Property or signature expected (when Prettier tries to format the resulting code, I assume).

Easy to see in the workbench (select "typescript transform"):

https://sinclairzx81.github.io/typebox-workbench/?share=Ly8gRWRpdCBUeXBlU2NyaXB0IFR5cGVzIEhlcmUuIFVzZSBDdHJsICsgUyB0byBTaGFyZQoKZXhwb3J0IHR5cGUgVCA9IHsKICAnaGVsbG8gd29ybGQnOiBudW1iZXIKfQ%3D%3D

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

1 participant