Skip to content

Missing indentation in codefix to implement interface #18795

@ghost

Description

TypeScript Version: nightly (2.6.0-dev.20170927)

See the fourslash test codeFixClassExprClassImplementClassFunctionVoidInferred.ts.
Similar errors are in other tests marked with GH#18795.

Code

class A {
    f() {}
}
let B = class implements A {[| |]}

Expected behavior:

    f(): void {
        throw new Error("Method not implemented.");
    }

Actual behavior:

f(): void {
    throw new Error("Method not implemented.");
}

Testing with newFileContent instead of newRangeContent gives even uglier results:

class A {
    f() {}
}

let B = class implements A {f(): void {
    throw new Error("Method not implemented.");
}
 }

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 this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions