Skip to content

Commit

Permalink
[DOC] Fix "property can be set by constructor" hint printed too often
Browse files Browse the repository at this point in the history
This hint should not be added to a property description if the object is
a singleton or has a private constructor.

Change-Id: I9b1e0791c7fb46d770eed3c6b4560c7a2918baef
  • Loading branch information
tbuschto committed Jan 20, 2020
1 parent bed3105 commit dd04b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/generate-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ class DocumentRenderer {
}
result.push(' mapped to this property.');
}
if (property.const && !isStatic) {
if (property.const && !isStatic && !this.def.object && this.def.constructor.access === 'public') {
result.push('\n\nThis property can only be set via constructor');
if (this.def.isWidget || this.def.extends === 'Popup') {
result.push(' or JSX');
Expand Down

0 comments on commit dd04b13

Please sign in to comment.