I'm trying to get some Angular 11 code working in Angular 14:
users = null;
deleteUser(id: string)
{
if (this.users == null) { }
else
{
const user = this.users.find(x => x.id === id);
... other stuff
}
}
The error is on the line const user = this.users.find( ... It says "property find() does not exist on type 'never'"... why would it think that the type is never? It has already checked that this.users != null