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

Fix TypeScript issue when using moduleResolution: node16 #245

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

LiamMartens
Copy link
Contributor

…notation when using moduleResolution node16/nodenext due to internal twJoin type (ClassNameValue)

…notation when using moduleResolution node16/nodenext due to internal twJoin type (ClassNameValue)
@LiamMartens
Copy link
Contributor Author

When using this package the ClassNameValues type is not exported which causes a type inference error when using moduleResolution: node16 or nodenext

@dcastil
Copy link
Owner

dcastil commented Jun 10, 2023

Hey @LiamMartens! 👋

Exporting the type makes sense to me, even thought about this recently.

Could you explain the problem you're trying to solve? I'm just not sure if I understand it correctly. What is the type inference error that happens because of the missing export? I just switched to "moduleResolution": "node16" in a TypeScript project using tailwind-merge but couldn't reproduce the issue myself.

@LiamMartens
Copy link
Contributor Author

@dcastil I get the issue with the extendTailwindMerge function (only for node16 or nodenext as mentioned):

image

I created a repo : https://github.com/LiamMartens/tailwind-merge-node16-module

@dcastil
Copy link
Owner

dcastil commented Jun 10, 2023

Thanks for the reproduction repo! 🙏 Wow, this is a weird error.

@dcastil dcastil changed the title fix: fixes an issue where consumers of this package require a type an… Fix TypeScript issue when using moduleResolution: node16 Jun 10, 2023
Copy link
Owner

@dcastil dcastil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! 🙏

@dcastil dcastil merged commit 02e86c7 into dcastil:main Jun 10, 2023
@dcastil dcastil added the bugfix label Jun 10, 2023
@github-actions
Copy link

This was addressed in release v1.13.2.

sebald referenced this pull request in sebald/pattern-analyzer Jun 21, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [tailwind-merge](https://togithub.com/dcastil/tailwind-merge) |
[`1.13.1` ->
`1.13.2`](https://renovatebot.com/diffs/npm/tailwind-merge/1.13.1/1.13.2)
|
[![age](https://badges.renovateapi.com/packages/npm/tailwind-merge/1.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/tailwind-merge/1.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/tailwind-merge/1.13.2/compatibility-slim/1.13.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/tailwind-merge/1.13.2/confidence-slim/1.13.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>dcastil/tailwind-merge</summary>

###
[`v1.13.2`](https://togithub.com/dcastil/tailwind-merge/releases/tag/v1.13.2)

[Compare
Source](https://togithub.com/dcastil/tailwind-merge/compare/v1.13.1...v1.13.2)

##### Bug Fixes

- Fix grammar and typos in docs by
[@&#8203;jmmarco](https://togithub.com/jmmarco) in
[https://github.com/dcastil/tailwind-merge/pull/249](https://togithub.com/dcastil/tailwind-merge/pull/249)
- Fix TypeScript issue when using `moduleResolution: node16` by
[@&#8203;LiamMartens](https://togithub.com/LiamMartens) in
[https://github.com/dcastil/tailwind-merge/pull/245](https://togithub.com/dcastil/tailwind-merge/pull/245)

##### Other

- Add tailwind-merge-php to similar packages in docs by
[@&#8203;JamesHemery](https://togithub.com/JamesHemery) in
[https://github.com/dcastil/tailwind-merge/pull/246](https://togithub.com/dcastil/tailwind-merge/pull/246)

**Full Changelog**:
dcastil/tailwind-merge@v1.13.1...v1.13.2

Thanks to [@&#8203;bluetch](https://togithub.com/bluetch) for sponsoring
tailwind-merge! ❤️

</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 is behind base branch, or you tick the
rebase/retry checkbox.

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

---

- [ ] <!-- rebase-check -->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/sebald/pattern-analyzer).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@dcastil dcastil added the context-v1 Related to tailwind-merge v1 label Oct 30, 2023
@dcastil dcastil added bug Something isn't working and removed bugfix labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working context-v1 Related to tailwind-merge v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants