如果 Typescript 函数的签名不是 return 类型,如何在 VSC 上出错

How to get an error on VSC if the signature of a Typescript Function doesn't return a type

嗨,我想知道是否有一种方法可以强制 TSLint(我猜)以便在函数不 return 类型(至少任何类型)时得到错误。

例如

cont myFunc(par: string) {
// somthing here
}

我想在那里出现错误,以迫使我这样做

cont myFunc(par: string): number { <--This!
// somthing here
}

tslint.json 中,"call-signature" 必须出现在 typedef:

tslint.json
...
  "typedef": [true, "call-signature", "property-declaration"]
...