Skip to content

docs: fix TypeDoc config and add missing JSDoc @returns tags#4

Merged
maximedrn merged 1 commit intomasterfrom
dev
Apr 3, 2026
Merged

docs: fix TypeDoc config and add missing JSDoc @returns tags#4
maximedrn merged 1 commit intomasterfrom
dev

Conversation

@maximedrn
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 3, 2026 20:26
@maximedrn maximedrn merged commit 5a21e58 into master Apr 3, 2026
6 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on improving generated API documentation by adjusting the TypeDoc configuration and refining JSDoc so TypeDoc produces more complete/usable output.

Changes:

  • Updated typedoc.json options and added externalSymbolLinkMappings for external symbols referenced via {@link ...}.
  • Added/normalized JSDoc @returns (with explicit types) on several documented APIs.
  • Updated README links for JobType/JobStatus/JobResult documentation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
typedoc.json Adjusts TypeDoc output behavior and introduces external symbol link mappings.
src/tasks/key-generation/key-generation.dto.ts Adds JSDoc for validator methods to improve generated docs.
src/jobs/jobs.types.ts Removes a stray comment marker near JobResult typing docs.
src/common/config/config.service.ts Adds explicit JSDoc @returns {type} for config getters.
README.md Changes documentation links for job-related types/enums.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +27 to 36
/**
* @param {number} threshold - The threshold value to validate.
* @param {ValidationArguments} args - Context containing the parent DTO.
* @returns {boolean} `true` if threshold is within participants or not yet
* parseable.
*/
validate(threshold: number, { object }: ValidationArguments): boolean {
const dto: KeyGenerationRequestDto = object as KeyGenerationRequestDto;
// If `participants` hasn't been parsed yet, defer to its own validator.
return dto.participants === undefined || threshold <= dto.participants;
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

The new JSDoc for validate documents a @param {ValidationArguments} args, but the signature destructures the second argument ({ object }: ValidationArguments) and there is no args parameter. This makes the generated docs misleading; either rename the parameter in the signature or update the JSDoc to match the actual parameter name/shape (and consider clarifying that the early-true case is when participants is still undefined).

Copilot uses AI. Check for mistakes.
Comment thread typedoc.json
Comment on lines +15 to +21
"\"crypto\".timingSafeEqual": "#"
},
"@nestjs/common": {
"UnauthorizedException": "#"
},
"@grpc/grpc-js": {
"Metadata": "#"
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

externalSymbolLinkMappings currently maps external symbols to "#", which produces non-useful/broken links in the rendered docs (everything points to the top of the current page). If the goal is to make {@link ...} references clickable, map these symbols to the appropriate external documentation URLs (e.g., Node.js/NestJS/gRPC API docs) or omit the mapping and tolerate the unresolved-link warnings.

Suggested change
"\"crypto\".timingSafeEqual": "#"
},
"@nestjs/common": {
"UnauthorizedException": "#"
},
"@grpc/grpc-js": {
"Metadata": "#"
"\"crypto\".timingSafeEqual": "https://nodejs.org/api/crypto.html#cryptotimingsafeequala-b"
},
"@nestjs/common": {
"UnauthorizedException": "https://www.jsdocs.io/package/@nestjs/common#UnauthorizedException"
},
"@grpc/grpc-js": {
"Metadata": "https://www.jsdocs.io/package/@grpc/grpc-js#Metadata"

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +176 to +178
* `JobType`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/types/jobs_jobs.types.JobResult.html) for possible result structures.
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

The README now hard-codes documentation links to https://shreeed-app.github.io/.... This will be incorrect for forks, non-master previews, or local documentation builds (where docs/ exists). Consider keeping relative links (e.g., ./docs/...) or providing both a relative link and a hosted GitHub Pages link so the README remains portable.

Suggested change
* `JobType`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/types/jobs_jobs.types.JobResult.html) for possible result structures.
* `JobType`: see [documentation](./docs/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](./docs/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](./docs/types/jobs_jobs.types.JobResult.html) for possible result structures.

Copilot uses AI. Check for mistakes.
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.

2 participants