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

Documentation Update: ObservablePoint.ts #7415

Merged
merged 5 commits into from
Apr 27, 2021

Conversation

jrod-disco
Copy link
Contributor

@jrod-disco jrod-disco commented Apr 16, 2021

Description of change

Update docs for ObservablePoint.ts

I made the assumption that we're attempting to document the surface API and there was no need to expose _x and _y internals. Please correct me if I'm wrong in this assumption.

Note: That there seems to be an issue with webdoc not properly inferring types from documentation on getters (and likely setters). Followed workaround provided by @bigtimebuddy here: webdoc-labs/webdoc#100

Pre-Merge Checklist
  • Documentation is changed or added
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

@jrod-disco
Copy link
Contributor Author

Should be good to go. Please let me know if there are any issues.

image

@bigtimebuddy
Copy link
Member

bigtimebuddy commented Apr 16, 2021

Thanks for this @jrod-disco
To answer your question: yes no need to prioritize internal members.

@SukantPal would be really nice to have a look at these inference issues with webdoc.

* Creates a new `ObservablePoint`
*
* @param cb - callback function triggered when `x` and/or `y` are changed
* @param scope - owner of callback
* @param {number} [x=0] - position of the point on the x axis
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Explicit type / default was needed here. Not sure if there's a better way around this.

*
* @member {number}
/** Position of the observable point on the x axis
* @type {number}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, needed to explicitly set the type of this member. It wasn't inferring on either getter or setter.

Copy link
Member

@ShukantPal ShukantPal left a comment

Choose a reason for hiding this comment

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

@webdoc/cli 1.2.1 will be getting the fix for interface property type inference.

@bigtimebuddy bigtimebuddy added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Apr 18, 2021
@bigtimebuddy bigtimebuddy added this to the v6.0.3 milestone Apr 27, 2021
@bigtimebuddy bigtimebuddy merged commit 8ef955c into pixijs:dev Apr 27, 2021
@bigtimebuddy
Copy link
Member

Thank you @jrod-disco 🎉

bigtimebuddy pushed a commit that referenced this pull request Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants