Skip to content

Commit

Permalink
Improve the isBlank return type
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Dec 8, 2024
1 parent cf4c27c commit a9e7c97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascripts/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export function castToNullIfUndef<T>(i:T): T | null{
return i === undefined ? null : i
}

export function isBlank(i:null|undefined|string) : boolean {
export function isBlank(i:null|undefined|string) : i is null | undefined | '' {
return i === null || i === undefined || i === '';
}

Expand Down

0 comments on commit a9e7c97

Please sign in to comment.