Filtro de texto digital indefinido
array.filter((x): x is MyType => x !== null);
Lucky Lobster
array.filter((x): x is MyType => x !== null);