fix(36140): handle quotesPreference option in interface implementation (#36398)

This commit is contained in:
Alexander T
2020-01-27 22:25:31 +02:00
committed by Sheetal Nandi
parent 20e8eba143
commit c239626f23
6 changed files with 34 additions and 5 deletions

View File

@@ -60,7 +60,8 @@ namespace ts.codefix {
switch (declaration.kind) {
case SyntaxKind.PropertySignature:
case SyntaxKind.PropertyDeclaration:
const typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context));
const flags = preferences.quotePreference === "single" ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : undefined;
const typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context));
out(createProperty(
/*decorators*/undefined,
modifiers,