I had this pretty easy method in Typescript (strict) that was giving me the following TSLint error:
TSLint: expected call-signature: 'toggleText' to have a typedef(typedef)
The function looked like this:
toggleText(usernotification: Usernotification) {
usernotification.showText = !usernotification.showText;
}
The solution is first to set up the argument to = (argument). Second, tell the method what you expect as a result (like a promise, a boolean, ...). In this case, it is nothing, so we add :void =>
toggleText = (usernotification: Usernotification): void => {
usernotification.showText = !usernotification.showText;
}