Skip to content

Commit

Permalink
Make parameter type generic for value checker (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
16sheep authored Aug 6, 2021
1 parent 42538f6 commit 04ef57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/value_checker.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export function doesHaveValue(value: any): boolean {
export function doesHaveValue<T>(value: T): boolean {
return !doesNotHaveValue(value)
}

export function doesNotHaveValue(value: any): boolean {
export function doesNotHaveValue<T>(value: T): boolean {
return value === null || value === undefined
}

Expand Down

0 comments on commit 04ef57d

Please sign in to comment.