Skip to content

Commit 155fd77

Browse files
authored
Improve isNullOrUndefined return type (#9)
1 parent 1d9c545 commit 155fd77

File tree

2 files changed

+375
-314
lines changed

2 files changed

+375
-314
lines changed

src/isNullOrUndefined.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
* Detects whether a given value is null or undefined
33
*/
44
// tslint:disable-next-line: no-any
5-
export function isNullOrUndefined(value: any): boolean {
5+
export function isNullOrUndefined(value: any): value is null | undefined {
66
return value === null || value === undefined;
77
}

0 commit comments

Comments
 (0)