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?
The signature of
.each()in thejquery.d.tsfile on the typescript repository is:The jQuery documentation says that
which implies that this
jquery.d.tsis wrong.If you grab an updated version from Boris Yankov’s repository, it will become:
This form will allow you to return anything, or nothing.