◐ Shell
clean mode source ↗

BridgeJS: Generate Swift doc-comment based on JSDoc by kateinoigakukun · Pull Request #596 · swiftwasm/JavaScriptKit

added 3 commits

February 6, 2026 12:08
- Added JSDoc parsing (description/@param/@returns) and DocC emission for callable/typed declarations, including classes/interfaces/enums, in `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/src/processor.js`, with guards to only read param/return tags on callable nodes.
- Added a documented fixture to cover the new behavior and updated the Vitest snapshot (`Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/fixtures/Documentation.d.ts`, `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/__snapshots__/ts2swift.test.js.snap`).

Tests:
- `npm test -- -u` (Plugins/BridgeJS/Sources/TS2Swift/JavaScript)

Next steps: optionally run `swift test --package-path ./Plugins/BridgeJS` to keep the Swift-side suite green.
…nt skill: new fixtures model lib.dom-style comments (MDN reference blocks, @param text) and updated Vitest snapshots to show how those JSDoc comments render into DocC. Key files: `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/fixtures/WebIDLDOMDocs.d.ts`, `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/fixtures/DOMLike.d.ts`, and the refreshed snapshot in `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/__snapshots__/ts2swift.test.js.snap`. Tests run: `npm test -- -u` (TS2Swift JavaScript).
…ut. Changes: deleted `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/fixtures/DOMLike.d.ts` and updated `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/test/__snapshots__/ts2swift.test.js.snap`.

Tests: `npm test -- -u` (TS2Swift JavaScript).

@kateinoigakukun kateinoigakukun changed the title Add WebIDL DOM doc fixtures for TS2Swift DocC output BridgeJS: Generate Swift doc-comment based on JSDoc

Feb 6, 2026