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 for TS2742 (workaround) #27

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Fix for TS2742 (workaround) #27

merged 1 commit into from
Apr 8, 2024

Conversation

jmchambers
Copy link
Contributor

@jmchambers jmchambers commented Apr 7, 2024

This fixes #18.

The temporary fix, as discussed in the issue, is to export additional private types. I've grouped all the types being exported for this reason together, at the bottom of src/main.d.ts, and added JSDoc comments in the files where the types are defined, warning that they are private, and won't be exported in the future.

I've tagged the JSDoc comments with @private as opposed to @deprecated, as the latter was very "noisy" in vscode popovers, and @private is closer to the truth anyway. The comments also link to the relevant issues in this repo and the TypeScript repo. I used markdown links, rather than JSDoc @link tags, as vscode messes up the formatting of the latter.

  • I have read the contribution guidelines.
  • I have added tests (we are enforcing 100% test coverage).
  • I have added documentation in the README.md, the docs directory (if
    any) and the examples directory (if any).
  • The status checks are successful (continuous integration). Those can be
    seen below.

## Known limitations and issues

For known limitations and issues related to TypeScript's current capabilities,
please see the comments in [src/main.d.ts](../src/main.d.ts).
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks 👍

* See:
*
* - [modern-errors issue #18](https://github.com/ehmicky/modern-errors/issues/18)
* - [TypeScript issue #47663](https://github.com/microsoft/TypeScript/issues/47663)
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for adding those!

@ehmicky
Copy link
Owner

ehmicky commented Apr 8, 2024

Thanks a lot for this PR @jmchambers.

@ehmicky ehmicky merged commit 23cb1c0 into ehmicky:main Apr 8, 2024
4 checks passed
@ehmicky
Copy link
Owner

ehmicky commented Apr 8, 2024

@all-contributors Could you please add @jmchambers for test, bug?

Copy link
Contributor

@ehmicky

I've put up a pull request to add @jmchambers! 🎉

@jmchambers
Copy link
Contributor Author

Thanks a lot for this PR @jmchambers.

No problem, @ehmicky, I'm glad to help! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript issues with moduleResolution: "nodenext" and declaration: true
2 participants