ts-reset icon indicating copy to clipboard operation
ts-reset copied to clipboard

Add boolean predicate

Open Krisztiaan opened this issue 2 years ago • 2 comments
trafficstars

Resolves #35

No breaking changes, just making the function typing of Boolean work as a predicate.

Krisztiaan avatar Feb 21 '23 17:02 Krisztiaan

FYI: this was merged into the TS main branch and then reverted because it can cause filter to convert any[] to unknown[] - which is not a issue for the aim of this project.

lukeapage avatar Feb 23 '23 08:02 lukeapage

FYI: this was merged into the TS main branch and then reverted because it can cause filter to convert any[] to unknown[] - which is not a issue for the aim of this project.

Added a test, but in general, this is not touching array.filter, because it's not changing new Boolean, which is used by TS when passing array.filter(Boolean), hence this change does not interfere with the filter-boolean rule.

Krisztiaan avatar Feb 23 '23 10:02 Krisztiaan

Closed the issue as won't implement - you can read my reasoning there #35

mattpocock avatar Mar 08 '23 17:03 mattpocock

Closed the issue as won't implement - you can read my reasoning there #39

This loops back to the same PR. 😅

yacinehmito avatar Mar 08 '23 20:03 yacinehmito

Fixed! Thanks @yacinehmito

mattpocock avatar Mar 09 '23 14:03 mattpocock