2

Closed

Comments in typescript 0.8.2

description

TYPESCRIPT:

this.SetValue(); //force read of value

JAVASCRIPT:

this.SetValue() //force read of value
;


The comma is moved after the comment.
Is this normal?
Closed Jan 28, 2013 at 7:58 PM by RyanCavanaugh
We're rewriting the entire comment preservation system in 0.9.x, so I'm closing these for now as we have (internal) bugs tracking the things that need to work (including this one). Thanks!

comments

oisin wrote Jan 25, 2013 at 6:11 PM

Syntactically the javascript is fine but it looks a mess. I also this happen:
   class MyClass {

        // blah blah blah
        // blah blah blah
        // blah blah blah
        static fooBar() {
                        ...
        }
gets converted to:
var MyClass = (function() {
    function MyClass() { }
    MyClass.fooBar = // blah blah blah
    // blah blah blah
    // blah blah blah
    function fooBar() {
        ...
    }
Which is very strange - I'm also curious how come the function is named instead of being anonymous. It does that regardless of the comment screw up. Anyway.