Skip to content
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

fix(jsii-pacmak): handles 'default' doc component for go #4115

Merged
merged 6 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/jsii-pacmak/lib/targets/go/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export class Documentation {
this.emitComment();
}

if (docs.default !== '') {
this.emitComment(`Default: ${docs.default}`);
this.emitComment();
}

this.emitStability(docs);
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/jsii-reflect/lib/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ export class Docs {
public get returns(): string {
return this.docs.returns ?? '';
}

/**
* Returns the default value
*/
public get default(): string {
return this.docs.default ?? '';
}
}

const stabilityPrecedence = {
Expand Down