Allow Boolean() to be used to perform a null check (#29955)

* Allow Boolean() to be used to perform a null check

* Add missing test case output
This commit is contained in:
Forbes Lindesay
2019-04-30 16:09:31 +01:00
committed by Ryan Cavanaugh
parent be409fad84
commit 3ce3cde493
5 changed files with 124 additions and 1 deletions

2
src/lib/es5.d.ts vendored
View File

@@ -513,7 +513,7 @@ interface Boolean {
interface BooleanConstructor {
new(value?: any): Boolean;
(value?: any): boolean;
<T>(value?: T): value is Exclude<T, false | null | undefined | '' | 0>;
readonly prototype: Boolean;
}