Do I need to specify a return type for an anonymous function in javascript / typescript?
- by Anne
I have the following function:
$('td:eq(' + iColumn + ') input', oSettings.oApi._fnGetTrNodes(oSettings))
.each(function () {
aData.push(this.value);
});
In typescript I am getting a message saying:
Error 3 Function declared a non-void return type, but has no return expression
Why am I getting this message? I can resolve the message by saying "return true". Should I always specify a return type for this?