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(types): fix type exports #244

Closed
wants to merge 1 commit into from

Conversation

remcohaszing
Copy link

πŸ”— Linked issue

twoslashes/twoslash#42 (comment)

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Jiti uses a special build step to compile the default export to export =. The generated type definitions don’t match this. To resolve this, a manual type declaration file was added.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Jiti uses a special build step to compile the default export to
`export =`. The generated type definitions don’t match this. To resolve
this, a manual type declaration file was added.
@pi0
Copy link
Member

pi0 commented Jun 7, 2024

Thanks for the PR. Would you mind to target it to 1.x branch? (I'm working on another refactor that changes whole bundling system of jit 2.x)

@remcohaszing
Copy link
Author

If you’re doing a semver major, I suggest another solution: Use a named export.

@pi0
Copy link
Member

pi0 commented Jun 7, 2024

Defenitly. Default will be for retro compat but yes i am planning to use ESM + named.

@remcohaszing
Copy link
Author

In that case I don’t recommend merging this into the 1.x branch. Feel free to merge or close this as you like. :)

@pi0 pi0 added the v1 label Jun 10, 2024
@pi0 pi0 marked this pull request as draft June 10, 2024 13:35
@pi0
Copy link
Member

pi0 commented Jul 1, 2024

Thanks for PR again. jiti v2 is almost ready with named { createJiti } export.

@pi0 pi0 closed this Jul 1, 2024
@remcohaszing remcohaszing deleted the fix-exports branch July 1, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants