JedWatson / JedWatson/react-select
Select Option type hint is too loose (missing "extends object")
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
If using number for the Select Option type then you get an error (Cannot use 'in' operator to search for 'options' in 0). This could be checked during type checking by indicating that Option must be an object (or any additional required restrictions) which would be a nice quality of life improvement.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Select Option type definition and reproduce the reported case using number as the Option type. Confirm that type checking rejects non-object options while valid object options remain supported; the runtime 'in' operator error should no longer be reachable through the type hint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100