Array.filter
Hi,
Will this be possible?
var foo: (number|string)[] = [1, 'bar']; foo.filter(item => typeof item ==='string').map(item => item/*string type*/); foo.filter(item => typeof item !=='string').map(item => item/*number type*/);
Not happening unless someone can figure out a reasonable way to write a signature for filter in a way that is generalizable.
filter
Activity
RyanCavanaugh commentedon Apr 20, 2015
Not happening unless someone can figure out a reasonable way to write a signature for
filterin a way that is generalizable.