I know this question appears several times. But didn't found solution for my app. I'm coding a function to color user avatars based on their name initials.
color = this.hashStringToColor(id);
this returns a color. then i push it into an array.
this.colorsByUser.push({
color: color,
id: id
});
this array is declared at the beginning in this way:
colorsByUser: IProfileColors[] = [];
IProfileColors is an interface and contains just color and id. As you see, nothing special is here but i have this weird error that i infer that means i cannot add nothing to the array. Is the first time i face it. Any ideas? Thanks in advance.