-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
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 pull request @mramato!
Reviewers, don't forget to make sure that:
|
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. |
I added |
@@ -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} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@kring there were a few more in that file I missed as well. So I pushed another small change. |
Okay, this is really ready now. |
Add a Specs/TypeScript directory with a minimal TS configuration that uses the d.ts files generated by build-ts
Have
build-ts
compile index.ts from this directory which makes sure various types actually conform to their expected interfaces.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!