-
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
Fix buildModuleUrl.setBaseUrl and .getCesiumBaseUrl in JSDoc/TypeScript #9783
Conversation
Thanks for the pull request @puxiao!
Reviewers, don't forget to make sure that:
|
Thanks again for your contribution @puxiao! No one has commented on this pull request in 90 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 90 days. If you'd like me to stop, just comment with |
@ebogo1 |
Thanks @puxiao! Unfortunately, this does not work correctly with the generated documentation ( In other modules, we use |
* @param {String} value The new base URL. | ||
* @return {Void} void |
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.
Throughout the codebase, we omit the return
tag if the return type is void.
I've tried to use @memberof and @function, but it doesn't solve the problem.
|
Thanks for taking a look @puxiao. Unfortunately, since this change breaks existing documentation, I don't think we can take it as is. Also, while this function is technically public, I don't believe we recommend it for use in your apps. What is the use case for using this function? |
Okay, I know. Thanks. |
Issue 8922 8924
Description
If we use TypeScript, we will encounter the following problems.
PROBLEMS:
Why?
Source/Core/buildModuleUrl.js
We can see that:
buildModuleUrl
is a functionbuildModuleUrl
also is a namespaceWhen we execute the command
build-ts
, this is very confusing forJSDoc
.Cesium.d.ts
We can see that
buildModuleUrl.setBaseUrl
andbuildModuleUrl.getCesiumBaseUrl
is not exported.Wrong solution
I have tried but failed.
yarn run build-ts
Cesium.d.ts
This time
buildModuleUrl.setBaseUrl
andbuildModuleUrl.getCesiumBaseUrl
is exported.But
export function buildModuleUrl
has disappeared.Emm.... I'm tired, destroy it.
The right solution
After unremitting efforts, I finally found a solution.
https://groups.google.com/g/jsdoc-users/c/1Md5S8j2ZI4
buildModuleUrl
to represent the functionbuildModuleUrl(1)
to represent the namespaceSource/Core/buildModuleUrl.js
yarn run build-ts
Wow...
Perfect !!!