Skip to content

[interop] Add Support for JSDoc Documentation #435

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

Merged
merged 6 commits into from
Aug 12, 2025

Conversation

nikeokoronkwo
Copy link
Collaborator

@nikeokoronkwo nikeokoronkwo commented Aug 2, 2025

Fixes #413

This PR adds support for parsing documentation for nodes/declarations in JSDoc and rewriting/providing them in a Dart-styled format, with support for @link references, annotations (@experimental and @deprecated for now), and more.

Documentation is generated for all declarations where documentation is provided.

There is currently no way to get library-level documentation via the TypeScript API

@nikeokoronkwo nikeokoronkwo marked this pull request as ready for review August 2, 2025 06:44
@nikeokoronkwo nikeokoronkwo requested a review from srujzs August 2, 2025 06:44
# Conflicts:
#	web_generator/lib/src/ast/declarations.dart
#	web_generator/lib/src/ast/helpers.dart
#	web_generator/lib/src/interop_gen/transform/transformer.dart
Copy link
Contributor

@srujzs srujzs left a comment

Choose a reason for hiding this comment

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

Very cool, thanks Nike!

@kevmoo
Copy link
Member

kevmoo commented Aug 8, 2025

@srujzs – can be merged?

…form

refactored `generateFromDocumentation` for nullable docs and removed unnecessary add for annotations in `transformer.dart`
Copy link
Contributor

@srujzs srujzs left a comment

Choose a reason for hiding this comment

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

LGTM, but let's wait to submit until we have CI no longer flaky again.

@nikeokoronkwo
Copy link
Collaborator Author

@srujzs after discussions, is it okay we merge this and then have a separate (draft) PR to fix this?
Recent PRs so far have not show flakiness.

@srujzs
Copy link
Contributor

srujzs commented Aug 12, 2025

I think that's fine, although I have no clue why it'd start being less flaky.

@nikeokoronkwo nikeokoronkwo merged commit 4310354 into dart-lang:main Aug 12, 2025
16 of 18 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 14, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ai (https://github.com/dart-lang/ai/compare/6b4b2bc..ee5b2b2):
  ee5b2b2  2025-08-13  Greg Spencer  Stop reporting errors for non-zero exits (dart-lang/ai#262)

protobuf (https://github.com/dart-lang/protobuf/compare/0b73b0d..6e9c9f4):
  6e9c9f4  2025-08-12  Ömer Sinan Ağacan  Improve clone and deepCopy tests (google/protobuf.dart#1039)
  086dfab  2025-08-12  Ömer Sinan Ağacan  Make proto3_json.dart aware of well known types (google/protobuf.dart#1037)
  277b45a  2025-08-12  Ömer Sinan Ağacan  Release protobuf 4.2.0 (google/protobuf.dart#1038)

shelf (https://github.com/dart-lang/shelf/compare/2a46b4f..400fc39):
  400fc39  2025-08-11  Kevin Moore  [shelf_router_generator] latest deps, prepare release (dart-lang/shelf#480)

web (https://github.com/dart-lang/web/compare/72cdd84..4310354):
  4310354  2025-08-12  Nikechukwu  [interop] Add Support for JSDoc Documentation (dart-lang/web#435)

webdev (https://github.com/dart-lang/webdev/compare/94c172c..c0492f1):
  c0492f1b  2025-08-13  Srujan Gaddam  [dwds] Wait for scripts to be parsed on a hot restart and publish DWDS 25.0.0 (dart-lang/webdev#2667)
  595f8768  2025-08-13  Nicholas Shahan  [dwds] Cleanup unused null safety related fields (dart-lang/webdev#2660)
  b43030e2  2025-08-12  Jessy Yameogo  Implemented hot restart over websocket (dart-lang/webdev#2666)

Change-Id: I1cb2a0c2ed693bb740ab4c40ea70678b03eec596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445340
Auto-Submit: Devon Carew <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interop Gen: Support Documentation
3 participants