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

Add additional smokescreen to build-ts #8908

Merged
merged 10 commits into from
Jun 5, 2020
Merged

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Jun 3, 2020

  1. Add a Specs/TypeScript directory with a minimal TS configuration that uses the d.ts files generated by build-ts

  2. Have build-ts compile index.ts from this directory which makes sure various types actually conform to their expected interfaces.

  3. Fix ImageryProvider interfaces which had issues exposed by this new test.

In the future we can add any additional smokescreens that we think are important to validate our definitions going forward, but this will never be a fully exhaustive check.

We currently don't actually execute the output, it's just there for compile-time checking. We can revisit this if we ever feel that it's needed.

Thanks for the assist here, @thw0rted!

1. Add a Specs/TypeScript directory with a minimal TS configuration that
uses the d.ts files generated by build-ts

2. Have `build-ts` compile index.ts from this directory which makes sure
various types actually conform to their expected interfaces.

3. Fix ImageryProvider interfaces which had issues exposed by this new
test.

In the future we can add any additional smokescreens that we think are
important to validate our definitions going forward, but this will never
be a fully exhaustive check.

We currently don't actually execute the output, it's just there for
compile-time checking.  We can revisit this if we ever feel that it's
needed.
@mramato mramato requested a review from kring June 3, 2020 17:09
@cesium-concierge
Copy link

Thanks for the pull request @mramato!

  • ✔️ 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.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@mramato
Copy link
Contributor Author

mramato commented Jun 3, 2020

Fixes #8905
Fixes #8901

@mramato mramato mentioned this pull request Jun 3, 2020
@mramato
Copy link
Contributor Author

mramato commented Jun 3, 2020

I'm also open to ideas of what else we might need to test from a "duck typing" standpoint or other potential easy to introduce TS errors. Those can be separate PRs (this one is ready) but we should expand this smokescreen as much as needed to ensure we don't have random TS problems crop up each release.

@mramato
Copy link
Contributor Author

mramato commented Jun 4, 2020

@kring ready.

Also fixes #8911 since it was trivial missing JSDoc.

@kring
Copy link
Member

kring commented Jun 4, 2020

I added |undefined one place that you missed, probably because its an imagery provider not named SomethingImageryProvider like the rest. Will merge as soon as CI passes.

@@ -114,7 +114,7 @@ function GoogleEarthEnterpriseMapsProvider(options) {
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
* 1.0 representing fully opaque.
*
* @type {Number}
* @type {Number|undefined}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure how the hell I missed these two. thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Saw your comment, that's exactly why.

@mramato
Copy link
Contributor Author

mramato commented Jun 4, 2020

@kring there were a few more in that file I missed as well. So I pushed another small change.

@mramato
Copy link
Contributor Author

mramato commented Jun 4, 2020

Okay, this is really ready now.

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