Skip to content

Formatter gets lost chaining functions as callbacks. #1888

Closed
@awerlang

Description

@awerlang

I have the following code:

    query(id: number) {
        return this.$http
            .get('/api/Entity/' + id)
            .then(function (data) {
            return data.data;     // (a)
        });                       // (b)
    }

When I type the semi-colon at point (a), it gets correctly indented. When a type a semi-colon at point (b), both lines get 4 columns to the left, which is the same output when a format the whole document.

I must add it gets on my nerves.

Any way to avoid it? Tks

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions