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

Declarations breaks typescript build when "skipLibCheck" is false #446

Open
JuanMurciaN opened this issue Oct 11, 2024 · 4 comments
Open

Comments

@JuanMurciaN
Copy link

Environment:

  • nodejs 18.20.4
  • npm 10.5.1

The library breaks typescript projects that check library's .d.ts files because a handful of these files are missing the exported members. Attached is a dummy project that recreates the failure, but it can be easily recreated by

  • Create a new npm project with npm init
  • Install typescript
  • Init typescript with npx tsc --init
  • Remove, or set to false skipLibCheck inside tsconfig.json
  • Install the library with npm i ews-javascript-api
  • Create a dummy file that imports something from the library
  • Build using npx tsc

dummy.zip

@gautamsi
Copy link
Owner

there are some problem which breaks this specific flag, PR welcome.

@JuanMurciaN
Copy link
Author

JuanMurciaN commented Oct 28, 2024

The issue is caused by the stripInternal flag set to true in the compilation options. Making all exports with an @internal comment not appear on their declaration files. If this is on purpose then the project cannot work with skipLibCheck: false unless the problematic exports @internal documentation comments are removed.

Edit: quote @internal to avoid tagging an unrelated user

@JuanMurciaN
Copy link
Author

I was trying to create a PR, but I don't think I have permissions to push to a side branch

@gautamsi
Copy link
Owner

you have to push to your fork and then create PR

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

No branches or pull requests

2 participants