@@ -22,6 +22,7 @@ interface AbcObject {
2222
2323const abcObject : AbcObject = anything ;
2424const array : AbcObject [ ] | null | undefined = anything ;
25+ const readonlyArray : readonly AbcObject [ ] = anything ;
2526const list : _ . List < AbcObject > | null | undefined = anything ;
2627const dictionary : _ . Dictionary < AbcObject > | null | undefined = anything ;
2728const numericDictionary : _ . NumericDictionary < AbcObject > | null | undefined = anything ;
@@ -392,6 +393,13 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
392393 _ . fill ( array , abcObject , 0 ) ; // $ExpectType AbcObject[]
393394 _ . fill ( array , abcObject , 0 , 10 ) ; // $ExpectType AbcObject[]
394395
396+ // @ts -expect-error
397+ _ . fill ( readonlyArray , abcObject ) ;
398+ // @ts -expect-error
399+ _ . fill ( readonlyArray , abcObject , 0 ) ;
400+ // @ts -expect-error
401+ _ . fill ( readonlyArray , abcObject , 0 , 10 ) ;
402+
395403 _ . fill ( list , abcObject ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
396404 _ . fill ( list , abcObject , 0 ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
397405 _ . fill ( list , abcObject , 0 , 10 ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
@@ -883,6 +891,12 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
883891 _ . pull ( array ) ; // $ExpectType AbcObject[]
884892 _ . pull ( array , abcObject ) ; // $ExpectType AbcObject[]
885893 _ . pull ( array , abcObject , abcObject , abcObject ) ; // $ExpectType AbcObject[]
894+ // @ts -expect-error
895+ _ . pull ( readonlyArray ) ;
896+ // @ts -expect-error
897+ _ . pull ( readonlyArray , abcObject ) ;
898+ // @ts -expect-error
899+ _ . pull ( readonlyArray , abcObject , abcObject , abcObject ) ;
886900 _ . pull ( list ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
887901 _ . pull ( list , abcObject ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
888902 _ . pull ( list , abcObject , abcObject , abcObject ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
@@ -913,6 +927,12 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
913927 _ . pullAt ( array ) ; // $ExpectType AbcObject[]
914928 _ . pullAt ( array , 1 ) ; // $ExpectType AbcObject[]
915929 _ . pullAt ( array , [ 2 , 3 ] , 4 ) ; // $ExpectType AbcObject[]
930+ // @ts -expect-error
931+ _ . pullAt ( readonlyArray ) ;
932+ // @ts -expect-error
933+ _ . pullAt ( readonlyArray , 1 ) ;
934+ // @ts -expect-error
935+ _ . pullAt ( readonlyArray , [ 2 , 3 ] , 4 ) ;
916936 _ . pullAt ( list ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
917937 _ . pullAt ( list , 1 ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
918938 _ . pullAt ( list , [ 2 , 3 ] , 4 ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
@@ -946,6 +966,10 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
946966
947967 _ . pullAll ( array ) ; // $ExpectType AbcObject[]
948968 _ . pullAll ( array , values ) ; // $ExpectType AbcObject[]
969+ // @ts -expect-error
970+ _ . pullAll ( readonlyArray ) ;
971+ // @ts -expect-error
972+ _ . pullAll ( readonlyArray , values ) ;
949973 _ . pullAll ( list ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
950974 _ . pullAll ( list , values ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
951975
@@ -979,6 +1003,11 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
9791003 return [ ] ;
9801004 } ) ;
9811005
1006+ // @ts -expect-error
1007+ _ . pullAllBy ( readonlyArray ) ;
1008+ // @ts -expect-error
1009+ _ . pullAllBy ( readonlyArray , values , "a" ) ;
1010+
9821011 _ . pullAllBy ( list ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
9831012 _ . pullAllBy ( list , values ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
9841013 _ . pullAllBy ( list , values , "a" ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
@@ -1072,6 +1101,10 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
10721101 b ; // $ExpectType AbcObject
10731102 return true ;
10741103 } ) ;
1104+ // @ts -expect-error
1105+ _ . pullAllWith ( readonlyArray ) ;
1106+ // @ts -expect-error
1107+ _ . pullAllWith ( readonlyArray , values ) ;
10751108 _ . pullAllWith ( list ) ; // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
10761109 // $ExpectType ArrayLike<AbcObject> || List<AbcObject>
10771110 _ . pullAllWith ( list , values , ( a , b ) => {
@@ -1163,6 +1196,15 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType CollectionChain<number>
11631196 fp . remove ( valueIterator ) ( list ) ; // $ExpectType AbcObject[]
11641197 fp . remove ( "" , list ) ; // $ExpectType AbcObject[]
11651198 fp . remove ( { a : 42 } , list ) ; // $ExpectType AbcObject[]
1199+
1200+ // @ts -expect-error
1201+ _ . remove ( readonlyArray ) ;
1202+ // @ts -expect-error
1203+ _ . remove ( readonlyArray , listIterator ) ;
1204+ // @ts -expect-error
1205+ _ . remove ( readonlyArray , "" ) ;
1206+ // @ts -expect-error
1207+ _ . remove ( readonlyArray , { a : 42 } ) ;
11661208}
11671209
11681210// _.tail
0 commit comments