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

Types export from package.json #12122

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

chris-cooper
Copy link
Contributor

@chris-cooper chris-cooper commented Aug 13, 2024

Description

We have a project that is failing to find TypeScript types when importing from cesium. It works when importing from @cesium/engine, (though that package doesn't have an exports section in the package.json).

This is the error:

Could not find a declaration file for module 'cesium'. '...my_project/node_modules/cesium/index.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/cesium` if it exists or add a new declaration (.d.ts) file containing `declare module 'cesium';`

The change in this PR allows the types to be found.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @chris-cooper!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented Aug 13, 2024

Thanks @chris-cooper! The change looks good. Could you please update CHANGES.md with a summary of the fix?

@chris-cooper
Copy link
Contributor Author

Ok thanks @ggetz I've added to CHANGES.md and rebased.

@ggetz
Copy link
Contributor

ggetz commented Aug 14, 2024

Great, thanks @chris-cooper!

@ggetz ggetz merged commit 6545ff7 into CesiumGS:main Aug 14, 2024
4 checks passed
@chris-cooper chris-cooper deleted the extra-export branch August 18, 2024 23:40
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.

2 participants