From dd04b133ea19bc09b6f364f264aced98aaec9b78 Mon Sep 17 00:00:00 2001 From: Tim Buschtoens Date: Mon, 20 Jan 2020 12:21:15 +0100 Subject: [PATCH] [DOC] Fix "property can be set by constructor" hint printed too often This hint should not be added to a property description if the object is a singleton or has a private constructor. Change-Id: I9b1e0791c7fb46d770eed3c6b4560c7a2918baef --- tools/generate-doc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate-doc.ts b/tools/generate-doc.ts index 210155826..a3a168f8a 100644 --- a/tools/generate-doc.ts +++ b/tools/generate-doc.ts @@ -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');