Skip to content

Trailing trivia removed for some object properties #10385

Open
@RussKie

Description

@RussKie

TypeScript Version: 1.8.x / Playground

Code

// the export annotations
export function bug() {
    // hello

    // another?

    // return annotation
    return {
        // return object annotation
        outer: {
            // more!
            inner1: { // here too
                // and more

                p1: 'v1', // comment1
                p2: 'v2', // comment2
                p3: 'v3'  // last comment
            } // here?
        } // and here?
    }; // here too?

    // and finally here
}

Playground demo

Expected behavior:
All comments preserved

Actual behavior:
comment1 and comment2 are removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Comment EmitThe issue relates to the emission of comments when compiling

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions