Filtre de dactylographie conditionnellement

this.Options.filter(x => {
  if (this.name && this.name != x.name) {
    return false; // remove if name is set and name doesn't match
  } else if (this.age && this.age != x.age) {
    return false; // remove if age is set and age doesn't match
  }

  return true; // keep
}
Kami