Is there a way to force the use of return method types in Typescript classes using the tslint rule?

I read the tslint rules here and although it looks like a typedef rule call-signature - this is what I want, it does not complain about the lack of a return type.

Does anyone know a rule (f exists) for enforcing return types in class methods?

+4
source share
1 answer

It turns out this can be done with:

"typedef": [
  true,
  "call-signature",
  "property-declaration"
]
+12
source

Source: https://habr.com/ru/post/1672290/


All Articles