Reputation: 4643
I've read the tslint rules here and while it looks like the typedef rule's call-signature
option is what I want, it doesn't complain about the lack of a return type.
Anyone know the rule (f one exists) to enforce return types on class methods?
Upvotes: 41
Views: 15994
Reputation: 4643
Turns out this can be done via:
"typedef": [
true,
"call-signature",
"property-declaration"
]
More info: https://palantir.github.io/tslint/rules/typedef/
Upvotes: 70