7 lines
No EOL
156 B
TypeScript
7 lines
No EOL
156 B
TypeScript
var foo = [
|
|
{ name: 'bar' },
|
|
{ name: null },
|
|
{ name: 'baz' }
|
|
]
|
|
|
|
foo.filter(x => x.name); //should accepted all possible types not only boolean!
|