-
Notifications
You must be signed in to change notification settings - Fork 142
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
📝 [RUM-158] Add jscdoc to public APIs #2775
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2775 +/- ##
=======================================
Coverage 93.33% 93.33%
=======================================
Files 242 242
Lines 7077 7077
Branches 1562 1562
=======================================
Hits 6605 6605
Misses 472 472 ☔ View full report in Codecov by Sentry. |
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.
When:
- running
yarn build
- then opening
test/app/app.ts
in your IDE - then hovering
datadogRum.init
ordatadogRum.setUser
Do you have the documentation showing up? I don't, and I think this is because typescript drops JSDoc comments in the output .d.ts
files in our case.
I managed to make them appear by declaring RumPublicApi
explicitely: instead of
type RumPublicApi = ReturnType<typeof makeRumPublicApi>
we might have to do:
interface RumPublicApi {
/**
* doc
*/
init(...): void
// etc.
}
function makeRumPublicApi(...): RumPublicApi {}
It might be a bit more verbose as we need to repeat function signatures in that type, but it should offer a nicer developer experience.
Bundles Sizes Evolution
🚀 CPU Performance
|
Motivation
JSDoc annotations are visible through the IDE, providing developers with immediate and comprehensive documentation as they integrate with our SDK.
Changes
Testing
I have gone over the contributing documentation.