X 归档 2022-08-19
Well that's badass.
Declaring a new overload for Array<T> lets you pass Boolean and filter out members of the array without using a type predicate.
Declaring a new overload for Array<T> lets you pass Boolean and filter out members of the array without using a type predicate.
哇,这也太酷了。
为 Array<T> 声明一个新的重载,就可以传入 Boolean 并过滤掉数组里的成员,而无需使用类型谓词。
为 Array<T> 声明一个新的重载,就可以传入 Boolean 并过滤掉数组里的成员,而无需使用类型谓词。




