budgielang / ts-budgie

Converts TypeScript code to Budgie. 🦜
https://budgielang.org
MIT License
2 stars 0 forks source link

Only output the GLS int type if possible #4

Open JoshuaKGoldberg opened 6 years ago

JoshuaKGoldberg commented 6 years ago

All JavaScript/TypeScript numerics may be changed at any time to float-style values from integers. Similar to not outputting arrays, this needs to stop.

JoshuaKGoldberg commented 6 years ago

...but on the other hand, it looks very odd to output for numbers start : i float 0 7. getNumericTypeNameFromNode should actually retrieve all usages of the node, so that if it's not exported publicly, and never modified in its scope, it correctly gets set to int.

JoshuaKGoldberg commented 6 years ago

This is particularly relevant with C# string and array indices: they don't accept floats.