...
doChunk().then(function (results) {
angular.forEach(results, function (info) {
if (info.data.fields.worklog) {
configProcess.results.push(info.data);
...
The above is just a sample from my AngularJS
application, but it's the same issue for all data (and vanilla JS) that's returned from somewhere else - like an HTTP
request in this case.
results - is the result of an HTTP request and contains an array of objects.
So when I loop over this array I access different properties of these objects. All is fine and it works, but how can I declare what the different properties of these methods are?
Basically what I want is to get rid of code inspection errors from WebStorm like these: Unresolved variable fields at line 106
.
It makes perfect sense to me why it's reported, but how do I address it?