Skip to content

QuoteStyle not respected for string literal types in implement interface #39332

Closed
@mjbvz

Description

@mjbvz

From microsoft/vscode#101219

TypeScript Version: 4.0.0-dev.20200629

Search Terms:

Code
Using "typescript.preferences.quoteStyle": "single"

interface IFoo {
  a(x: 'abc') : void;
}

class Foo implements IFoo {

}

Run implement interface on Foo

Bug:
The parameter value uses double quotes:

class Foo implements IFoo {
  a(x: "abc"): void {
    throw new Error('Method not implemented.');
  }
}

Also, if typescript.preferences.quoteStyle is unset, it would be nice if we used the original quote style for implement interface

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions