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

Update JSDoc for optional options #11626

Merged
merged 4 commits into from
Nov 13, 2023
Merged

Update JSDoc for optional options #11626

merged 4 commits into from
Nov 13, 2023

Conversation

angrycat9000
Copy link
Contributor

Updates IonImageryProvider.fromAssetId and Cesium3DTileset.fromIonAssetId to have optional options. In both cases options arguments were not marked as optional in JSDoc causing them to be required in Typescript.

Fixes #11623 and fixes #11624

Test Plan

Run npm build-ts

Open the generated typescript definition file, and verify that both methods now include optinons?: instead of options: to mark them as optional

 static fromAssetId(assetId: number, options?: IonImageryProvider.ConstructorOptions): Promise<IonImageryProvider>;

 static fromIonAssetId(assetId: number, options?: Cesium3DTileset.ConstructorOptions): Promise<Cesium3DTileset>;
@cesium-concierge
Copy link

Thank you so much for the pull request @angrycat9000! I noticed this is your first pull request and I wanted to say welcome to the Cesium community!

The Pull Request Guidelines is a handy reference for making sure your PR gets accepted quickly, so make sure to skim that.

  • ❌ Missing CONTRIBUTORS.md entry.
  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
CHANGES.md Outdated Show resolved Hide resolved
@angrycat9000
Copy link
Contributor Author

Updated with that suggestion @ggetz

@ggetz
Copy link
Contributor

ggetz commented Nov 13, 2023

Great, thanks @angrycat9000 !

@ggetz ggetz merged commit 2db7028 into main Nov 13, 2023
9 checks passed
@ggetz ggetz deleted the optional-options branch November 13, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants