lib Update Request
Configuration Check
My compilation target is ES2015 and my lib is the default.
Missing / Incorrect Definition
I would love to add an overload to Array.filter which takes in a common use case of passing a Boolean directly to .filter. This would offer a simple, intuitive workaround for a common pain point with .filter.
This could be achieved via an overload adding BooleanConstructor, and a type predicate.
https://www.typescriptlang.org/play?#code/PTAEHUEsBcAtTgU1AewG6IE4BsUEMATAWACgBjFAOwGdpQ9NNQBeUAbQCIBGDgGlACulAogBmkSogIBdANykQoJaAB6AflKkJ0LKLxlkAQUZ4AngB4AKgD5QAb1JLx2HZgAUAB0xTIZPDoAuUAAhFBRsRDxKAGEqWkwBMmgUTABKIIA5KgAxPGxqCxs2OVIAX00SaFMPZCzKXPzC21ZLUEQADx1halAABlAAH1AAcmHB0EoBbGxxoRFxSQJQNQnEDCYgy3kSUgoaOmdXKWMmVgZMADpDrDdQ8MjKVO3FZXUgA
Sample Code
const arr = ['1', undefined];
const filteredArr = arr.filter(Boolean);
filteredArr should be string[], not (string | undefined)[].