TypeScript 自动导入中的 WebStorm/PhpStorm 双引号

编程入门 行业动态 更新时间:2024-10-26 16:23:36
本文介绍了TypeScript 自动导入中的 WebStorm/PhpStorm 双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用带单引号的 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:

  • 设置/首选项
  • 编辑器 |代码风格 |打字稿
  • 标点符号"选项卡 |生成的代码 ->引号
  • 从 2017.1 版本开始,它位于新的 Punctuation 选项卡上,并且选项的命名略有不同:

    As of 2017.1 version it's on new Punctuation tab and options are named a bit differently:

    更多推荐

    TypeScript 自动导入中的 WebStorm/PhpStorm 双引号

    本文发布于:2023-06-02 08:36:56,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/440299.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:双引号   TypeScript   WebStorm   PhpStorm

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!