@@ -13,6 +13,7 @@ describe('R.filter with array', () => {
1313 )
1414 result // $ExpectType number[]
1515 } )
16+
1617 it ( 'narrowing type' , ( ) => {
1718 interface Foo {
1819 a : number
@@ -31,6 +32,7 @@ describe('R.filter with array', () => {
3132 )
3233 result // $ExpectType Bar[]
3334 } )
35+
3436 it ( 'narrowing type - readonly' , ( ) => {
3537 interface Foo {
3638 a : number
@@ -49,11 +51,19 @@ describe('R.filter with array', () => {
4951 )
5052 result // $ExpectType Bar[]
5153 } )
52- it ( 'filtering NonNullable' , ( ) => {
53- const testList = [ 1 , 2 , null , undefined , 3 ]
54+
55+ it ( 'filtering NonNullable' , ( ) => {
56+ const testList = [ 1 , 2 , null , undefined , false , 3 ]
5457 const result = pipe ( testList , filter ( Boolean ) )
5558 result // $ExpectType number[]
5659 } )
60+
61+ it ( 'filtering NonNullable - list of objects' , ( ) => {
62+ const testList = [ { a :1 } , { a :2 } , false , { a :3 } ]
63+ const result = pipe ( testList , filter ( Boolean ) )
64+ result // $ExpectType number[]
65+ } )
66+
5767 it ( 'filtering NonNullable - readonly' , ( ) => {
5868 const testList = [ 1 , 2 , null , undefined , 3 ] as const
5969 const result = pipe ( testList , filter ( Boolean ) )
0 commit comments