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

types(hooks): improve Typescript for onChange funtions #1580

Merged
merged 3 commits into from
Mar 9, 2024

Conversation

silviuaavram
Copy link
Collaborator

@silviuaavram silviuaavram commented Mar 7, 2024

What:
Improve the type of the onChange options parameter to reflect that individual onChange functions are called with non-optional state values.

Why:
For example, onIsOpenChange will always be called with isOpen, so the type will be {type, isOpen, highlightedIndex?, inputValue?, ...}

Closes #1225

How:
Change the typings.ts

Checklist:

  • Documentation
  • Tests
  • TypeScript Types
  • Flow Types
  • Ready to be merged

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a583281) to head (303e8cf).
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1580   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines         1755      1755           
  Branches       529       529           
=========================================
  Hits          1755      1755           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@silviuaavram silviuaavram changed the base branch from master to v9 March 9, 2024 12:43
@silviuaavram silviuaavram changed the title types(hooks): improve for onChange funtions types(hooks): improve Typescript for onChange funtions Mar 9, 2024
@silviuaavram silviuaavram merged commit f79c593 into v9 Mar 9, 2024
1 check passed
@silviuaavram silviuaavram deleted the feat/improve-on-change-types branch March 9, 2024 12:46
silviuaavram added a commit that referenced this pull request Mar 13, 2024
* types(hooks): improve for onChange funtions

* migration guide

* fix doctoc
@silviuaavram silviuaavram mentioned this pull request Mar 15, 2024
Merged
5 tasks
silviuaavram added a commit that referenced this pull request Mar 20, 2024
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!

Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).

Also, please make sure you're familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).

If you're new to contributing to open source projects, you might find this free
video course helpful: http://kcd.im/pull-request

Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->

**What**:
BREAKING CHANGE: Release Downshift v9.

<!-- Why are these changes necessary? -->

**Why**:
Release the changes in:
- #1580
- #1579
- #1583

Closes #1322.
Closes #1244.
Closes #1227
Closes #1225.
<!-- How were these changes implemented? -->

**How**:
Merged the PRs in this branch.
<!-- Have you done all of these things?  -->

**Checklist**:

<!-- add "N/A" to the end of each line that's irrelevant to your changes -->

<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

- [x] Documentation
- [x] Tests
- [x] TypeScript Types
- [ ] Flow Types
- [x] Ready to be merged
      <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->

<!-- feel free to add additional comments -->
mergify bot referenced this pull request in SvenKirschbaum/musikbot-frontend Mar 22, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [downshift](https://downshift-js.com) ([source](https://togithub.com/downshift-js/downshift)) | [`^8.3.1` -> `^9.0.0`](https://renovatebot.com/diffs/npm/downshift/8.5.0/9.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/downshift/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/downshift/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/downshift/8.5.0/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/downshift/8.5.0/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>downshift-js/downshift (downshift)</summary>

### [`v9.0.0`](https://togithub.com/downshift-js/downshift/releases/tag/v9.0.0)

[Compare Source](https://togithub.com/downshift-js/downshift/compare/v8.5.0...v9.0.0)

##### Features

-   V9 ([#&#8203;1582](https://togithub.com/downshift-js/downshift/issues/1582)) ([5b0d503](https://togithub.com/downshift-js/downshift/commit/5b0d5031c1c11455ba18fa1516a259b4ed9357a1))

##### BREAKING CHANGES

-   Release Downshift v9.



**Why**:
Release the changes in:

-   [https://github.com/downshift-js/downshift/pull/1580](https://togithub.com/downshift-js/downshift/pull/1580)
-   [https://github.com/downshift-js/downshift/pull/1579](https://togithub.com/downshift-js/downshift/pull/1579)
-   [https://github.com/downshift-js/downshift/pull/1583](https://togithub.com/downshift-js/downshift/pull/1583)

Closes [https://github.com/downshift-js/downshift/issues/1322](https://togithub.com/downshift-js/downshift/issues/1322).
Closes [https://github.com/downshift-js/downshift/issues/1244](https://togithub.com/downshift-js/downshift/issues/1244).
Closes [https://github.com/downshift-js/downshift/issues/1227](https://togithub.com/downshift-js/downshift/issues/1227)
Closes [https://github.com/downshift-js/downshift/issues/1225](https://togithub.com/downshift-js/downshift/issues/1225).



**How**:
Merged the PRs in this branch.



**Checklist**:





-   \[x] Documentation
-   \[x] Tests
-   \[x] TypeScript Types
-   \[ ] Flow Types
-   \[x] Ready to be merged 



</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/SvenKirschbaum/musikbot-frontend).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants