WebStorm / PhpStorm在TypeScript自动导入中引用双引号 [英] WebStorm/PhpStorm double quotes in TypeScript auto import
本文介绍了WebStorm / PhpStorm在TypeScript自动导入中引用双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用带单引号的TypeScript样式,双引号仅在HTML模板中使用。
I'm using TypeScript style with single quotes, double quotes are used exclusively in HTML templates.
WebStorm / PhpStorm自动导入添加 import
带双引号的语句并破坏了样式。我想这适用于所有JetBrains产品。
WebStorm/PhpStorm auto import adds import
statements with double quotes and ruins the style. I guess this applies to all JetBrains products.
如何解决这个问题?
推荐答案
此行为由以下选项控制:
This behaviour is controlled by the following option:
-
设置/首选项
-
编辑|代码风格| TypeScript
-
标点符号标签|生成的代码 - >引用标记
Settings/Preferences
Editor | Code Style | TypeScript
"Punctuation" tab | Generated code -> Quote marks
截至2017.1版本它位于新的标点符号
标签上,选项命名略有不同:
As of 2017.1 version it's on new Punctuation
tab and options are named a bit differently:
这篇关于WebStorm / PhpStorm在TypeScript自动导入中引用双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文