ts2hx icon indicating copy to clipboard operation
ts2hx copied to clipboard

keyword variables

Open nadako opened this issue 10 years ago • 2 comments

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"];)

nadako avatar Mar 10 '15 21:03 nadako

btw, it's not just keywords, but also things like $scope.

nadako avatar Mar 10 '15 22:03 nadako

If @:native handles that well, then let's use it. The result should be a lot easier to grasp for the reader.

back2dos avatar Mar 11 '15 12:03 back2dos