Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mjbvz opened this issue Jun 29, 2020 · 0 comments · Fixed by #39348
Closed

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

mjbvz opened this issue Jun 29, 2020 · 0 comments · Fixed by #39348
Labels
Bug A bug in TypeScript
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 29, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
2 participants