Add isPropNull helper function
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## Summary
In #1211 we create a helper function for isPropDefined, we should do similar for cases where we check the prop is not null.
## 💬 Description
Add helper function to helpers.ts and then replace instances of ` !== null` to use the helper function.
Edit: also agreed on refinement to extend this to also being able to check for ` !== undefined`, as that occurs in quite a few places in the code. may want
isPropNull
isPropUndefined
isPropNullOrUndefined
## 💰 User value
Will make the code more readable.
Contributor guide
Research direction
Start by reading helpers.ts and reviewing the existing isPropDefined helper referenced in issue #1211. Search the codebase for prop checks against null and undefined, then determine the agreed helper variants and replace the matching instances. Done means the helpers are added and the relevant checks consistently use them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100