sentry
sentry copied to clipboard
types(compact-select): Ensure that onChange type is inferred properly [UP-141]
The types in <CompactSelect /> are such that onChange always gets inferred as (value: any) => void. These changes make sure that the typings are correct.
To do this, I also had to use conditional typing for the multiple prop since that changes the type of the onChange argument to an array.
Other file changes are to fix consumers of CompactSelect that weren't typed narrowly enough.
Before:

After:

w/ multiple
