Skip to content

Some comments get stripped out of JS output #5848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alvarorahul opened this issue Dec 1, 2015 · 2 comments
Closed

Some comments get stripped out of JS output #5848

alvarorahul opened this issue Dec 1, 2015 · 2 comments
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created

Comments

@alvarorahul
Copy link

The following TS file

export = Main;
module Main {
    // Test 1

    class Foo {
        // Test 2
        public bar = 5;
        // Test 3
        }

    // Test 4
}

produces the following JS output

define(["require", "exports"], function (require, exports) {
    var Main;
    (function (Main) {
        // Test 1
        var Foo = (function () {
            function Foo() {
                // Test 2
                this.bar = 5;
            }
            return Foo;
        })();
    })(Main || (Main = {}));
    return Main;
});

NOTE that the comments // Test 3 and // Test 4 are not present

I would expect that all comments in the TS file are preserved in the generated JS file

@mhegazy mhegazy added the Bug A bug in TypeScript label Dec 1, 2015
@synaesthesia
Copy link

Known bug: #1311

@mhegazy
Copy link
Contributor

mhegazy commented Dec 1, 2015

thanks @synaesthesia

@mhegazy mhegazy closed this as completed Dec 1, 2015
@mhegazy mhegazy added the Duplicate An existing issue was already created label Dec 1, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants