DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.36k stars 29 forks source link

Use {} for empty if and else blocks #1245

Closed edemaine closed 4 months ago

edemaine commented 4 months ago

Fixes #1244

Oddly TypeScript complains about an if block being the empty statement ;, but doesn't complain about else blocks or loops.

For symmetry, I changed both if and else blocks to use {} empty blocks instead of ;, but left loops alone. Also cleaned up postfix detection.