Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace use of any in value checker with generic type #1734

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Before anything else, thank you. Thank you for taking some of your precious time

## Tests

See the `package.json` scripts section for how to run each category of tests.
Now type `yarn run` or see the `package.json` scripts section for how to run each category of tests.
aurelien-reeves marked this conversation as resolved.
Show resolved Hide resolved

* lint - `yarn lint`
* [prettier](https://github.com/prettier/prettier)
Expand Down
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