Skip to content

Space added before decorated method parameter #20449

@mjbvz

Description

@mjbvz

From microsoft/vscode#39554

TypeScript Version: 2.7.0-dev.20171203

Code

class Test {
    constructor(@foo props: any) {
    }
}

Run format

Expected behavior:
No change

Actual behavior:
Space added:

class Test {
    constructor( @foo props: any) {
    }
}
[Trace  - 11:54:15 AM] Response received: format (92). Request took 4 ms. Success: true 
Result: [
    {
        "start": {
            "line": 2,
            "offset": 17
        },
        "end": {
            "line": 2,
            "offset": 17
        },
        "newText": " "
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterFixedA PR has been merged for this issueHelp WantedYou can do thisVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions