MVTDataProvider: Fix generated type definitions#13616
Open
donmccurdy wants to merge 2 commits into
Open
Conversation
Contributor
|
Thank you for the pull request, @donmccurdy! ✅ We can confirm we have a CLA on file for you. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The type definitions for MVTDataProvider (generated from JSDoc by tsd-jsdoc) are currently incomplete. This PR fixes the type definitions, by adding missing
@extendsand@returnsdeclarations.It's easy to forget these declarations, especially since they aren't necessary for type checking — TypeScript already knows the return type and the class inheritance here. I've added a rule for ast-grep to warn when a publicly-documented class is missing JSDoc for its parent class.
Ideally we'd also have a rule to detect when methods are missing a required
@returnstag, but I'm not sure what conditions require that, or how to detect it, yet. All public functions and methods? Perhaps all async functions need the tag, since otherwise tsd-jsdoc doesn't know they return a promise? The@asynctag doesn't appear to be supported by tsd-jsdoc. In any case I've left that part out of scope for this PR.Issue number and link
Testing plan
Diff of
Cesium.d.ts:Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my changeAI acknowledgment
If yes, I used the following Tools(s) and/or Service(s):
If yes, I used the following Model(s):
PR Dependency Tree
This tree was auto-generated by Charcoal