I have a piece of code where I have data variable with given declaration. But when I loop through data object I am getting error as below:
"cannot invoke an expression whose type lacks a call signature"
export class AppComponent {
title = 'app works!';
data : any[] | Observable<any[]>;
constructor()
{
this.data.forEach(function(d)
{
});
}
}
Not sure it is typescript issue or due to incorrect type declaration.