PhpStorm 2016.2.1打字稿格式删除冒号周围的空格

时间:2016-09-27 05:02:25

标签: phpstorm

今天更新为PhpStorm 2016.2.1

根据我的TSLint规则,我的TS文件中的格式不正确。

"typedef-whitespace": [
      true,
      {
        "call-signature": "nospace",
        "index-signature": "nospace",
        "parameter": "nospace",
        "property-declaration": "nospace",
        "variable-declaration": "nospace"
      },
      {
        "call-signature": "nospace",
        "index-signature": "nospace",
        "parameter": "nospace",
        "property-declaration": "nospace",
        "variable-declaration": "nospace"
      }
    ]

enter image description here

Editor > Code Style > Typescript中,没有示例或规则来删除类型断言后的空格。

enter image description here

1 个答案:

答案 0 :(得分:0)

  

In Editor > Code Style > Typescript在类型断言后没有删除空格的示例或规则。

嗯..我在PhpStorm 2016.2.1中清楚地看到它(删除屏幕截图中箭头指示的那两个空格的选项)。我自己不是一个TypeScript人(根本没有)..所以也许它不会影响你的代码..但对我来说它看起来是正确的选择。

  1. Settings/Preferences | Editor | Code Style | TypeScript
  2. Spaces | Other | After type reference colon ':'
  3. enter image description here

相关问题