-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
Thanks for this @jrod-disco @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 |
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.
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} |
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.
Again, needed to explicitly set the type of this member. It wasn't inferring on either getter or setter.
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.
@webdoc/cli 1.2.1 will be getting the fix for interface property type inference.
Thank you @jrod-disco 🎉 |
Description of change
Update docs for
ObservablePoint.ts
fix
- update documentation according to: Help Wanted: Reformatting Documentation #7159I 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
npm run lint
)npm run test
)