mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-07 09:20:57 -05:00
Make anyArray.filter(Boolean) return any[], not unknown[] (#31515)
* Add this-parameter workaround to Array.filter Allows anys.filter(Boolean) to once again return any[], not unknown[]. * Add any constraint to Boolean factory function I want to test how well this works. * Remove Boolean factory type guard * Remove typeGuardBoolean test
This commit is contained in:
committed by
GitHub
parent
1e7a77cf78
commit
b36c8a0690
2
src/lib/es5.d.ts
vendored
2
src/lib/es5.d.ts
vendored
@@ -513,7 +513,7 @@ interface Boolean {
|
||||
|
||||
interface BooleanConstructor {
|
||||
new(value?: any): Boolean;
|
||||
<T>(value?: T): value is Exclude<T, false | null | undefined | '' | 0>;
|
||||
<T>(value?: T): boolean;
|
||||
readonly prototype: Boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user