Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 548 Bytes

arrow-parens.md

File metadata and controls

36 lines (26 loc) · 548 Bytes
sidebarDepth categories tags
0
TypeScript
TSLint
TypeScript

arrow-parens

箭头函数参数必须用圆括号括起来,但如果只有一个参数的话则不允许使用圆括号。

  • 本规范中的配置:

"arrow-parens": [true, "ban-single-arg-parens"]

foo = (a) => a + 1;
foo = (a, b) => a + b;
foo = a => a + 1;
foo = (a: number) => a + 1;