Encountering an error with newUser
this.userObj.assigned_to.push(newUser);
, receiving argument of type 'any' is not assignable to parameter of type 'never' typescript solution
Looking for a way to declare newUser to resolve the error.
Your assistance is greatly appreciated.
addSubData(user: any) {
let i: any;
i = document.querySelectorAll('input[type="checkbox"]:checked');
for(var checked of i) {
const newUser = Object.assign({}, user)
newUser.dl = checked.value;
newUser.sub_impact = "Applicable";
newUser.co_score = "Added";
this.userObj.assigned_to.push(newUser);
}
this.commonService.updateUser(this.userObj).subscribe(()=> {
this.getLatestUser();
});
}