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

feat(dts): strip internal by default, add dts compiler overrides option #11

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

jacob-alford
Copy link
Collaborator

@jacob-alford jacob-alford commented Aug 21, 2024

Changes

  • Now TypeScript will strip anything marked with the @internal jsdoc tag. See the relevant documentation.
  • There is now an available config option to override compiler options. Do not use this option unless you know what you are doing.

Note to library authors

If you use the @internal JSDoc tag, this will likely result in a breaking change for your library as those types will no longer be included in the final output.

If you wish to continue including those internal types as to avoid a breaking change, pass the following to the configuration which will override the new default option.

{
  dtsCompilerOverrides: {
    stripInternal: false
  }
}

A word of caution

If one of your exports depends on something that is marked with an @internal tag, this will result in an error during type compilation. This should be caught during lib-check, so do not disable that option.

@jacob-alford jacob-alford merged commit 6dba5ed into main Aug 21, 2024
3 checks passed
@jacob-alford jacob-alford deleted the ja/strip-internal branch August 21, 2024 18:15
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.

1 participant