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: mark options param of ImageryLayer.fromProviderAsync as optional #12400

Merged
merged 6 commits into from
Jan 7, 2025

Conversation

NickCrews
Copy link
Contributor

As the examples show, it is perfectly fine to not pass in the options object. However, in my typescript project, if I don't pass in the options, I get a type error. This is intended to fix that error.

This was brought up in https://community.cesium.com/t/error-when-initialize-imagerylayer-fromproviderasync-without-options/31665

I'm not used to typescript/jsdoc at all, so this might not actually be the right way to do this. If you tell me how to do this,
let me know and I can update it.

Copy link

github-actions bot commented Dec 29, 2024

Thank you for the pull request, @NickCrews! Welcome to the Cesium community!

In order for us to review your PR, please complete the following steps:

Review Pull Request Guidelines to make sure your PR gets accepted quickly.

@NickCrews
Copy link
Contributor Author

I just signed the CLA. I don't personally need myself in the contributors file. If YOU require me in there, I can add myself.

jjspace
jjspace previously requested changes Jan 3, 2025
Copy link
Contributor

@jjspace jjspace left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Just had one small comment.

If YOU require me in there, I can add myself.

Yes, if you could please add yourself that would be great 🙏

packages/engine/Source/Scene/ImageryLayer.js Outdated Show resolved Hide resolved
@NickCrews
Copy link
Contributor Author

I added myself to contributors and adjusted the docstring. Thank you! @jjspace

…onal

As the examples show, it is perfectly fine to not pass in the options object. However, in my typescript project, if I don't pass
in the options, I get a type error. This is intended to fix that error.

This was brought up in https://community.cesium.com/t/error-when-initialize-imagerylayer-fromproviderasync-without-options/31665
@ggetz
Copy link
Contributor

ggetz commented Jan 6, 2025

Thanks @NickCrews! Since this affects the TypeScript definitions, could you please add an item in CHANGES.md under "Fixes" with a short summary of the error that was fixed?

NickCrews added a commit to NickCrews/cesium that referenced this pull request Jan 6, 2025
@NickCrews
Copy link
Contributor Author

@ggetz done, thank you!

@ggetz
Copy link
Contributor

ggetz commented Jan 7, 2025

Perfect, thanks @NickCrews!

@ggetz ggetz dismissed jjspace’s stale review January 7, 2025 14:11

Confirmed request changes were made.

@ggetz ggetz added this pull request to the merge queue Jan 7, 2025
Merged via the queue into CesiumGS:main with commit 268232a Jan 7, 2025
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.

3 participants