mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
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:
committed by
Ryan Cavanaugh
parent
be409fad84
commit
3ce3cde493
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;
|
||||
(value?: any): boolean;
|
||||
<T>(value?: T): value is Exclude<T, false | null | undefined | '' | 0>;
|
||||
readonly prototype: Boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user