标签: typescript tslint
我已经阅读了tslint规则here,而看起来,如the typedef rule' call-signature选项就是我想要的,它并没有抱怨缺乏回归类型。
call-signature
任何人都知道在类方法上强制执行返回类型的规则(f存在)吗?
答案 0 :(得分:36)
原来可以通过以下方式完成:
"typedef": [ true, "call-signature", "property-declaration" ]
更多信息:https://palantir.github.io/tslint/rules/typedef/