ts2hx
ts2hx copied to clipboard
keyword variables
TypeScript apparently allows to use keywords as a variable/function name (e.g. declare var class). We should handle haxe keywords somehow. I'm not sure whether @:native is enough for that (e.g. @:native("class") var class_:Dynamic;) or we should generate a property with inline getters/setters (e.g. var class_(get,set):Dynamic; inline function get_class_():Dynamic return untyped this["class"];)
btw, it's not just keywords, but also things like $scope.
If @:native handles that well, then let's use it. The result should be a lot easier to grasp for the reader.