diff --git a/README.md b/README.md
index 78fbd8bfe..5dd18fb95 100644
--- a/README.md
+++ b/README.md
@@ -554,7 +554,7 @@ Supported decorators are:
* **Type.d(typeName?: `string`)** *(optional)*
annotates a class as a protobuf message type. If `typeName` is not specified, the constructor's runtime function name is used for the reflected type.
-* **Field.d<T>(fieldId: `number`, fieldType: `string | TMessageConstructor`, fieldRule?: `"optional" | "required" | "repeated"`, defaultValue?: `T`)**
+* **Field.d<T>(fieldId: `number`, fieldType: `string | Constructor`, fieldRule?: `"optional" | "required" | "repeated"`, defaultValue?: `T`)**
annotates a property as a protobuf field with the specified id and protobuf type.
* **MapField.d<T extends { [key: string]: any }>(fieldId: `number`, fieldKeyType: `string`, fieldValueType. `string | Constructor<{}>`)**
diff --git a/cli/lib/tsd-jsdoc/publish.js b/cli/lib/tsd-jsdoc/publish.js
index 4c4c39593..c28073159 100644
--- a/cli/lib/tsd-jsdoc/publish.js
+++ b/cli/lib/tsd-jsdoc/publish.js
@@ -395,11 +395,9 @@ function writeInterfaceBody(element) {
write("}");
}
-function writeProperty(property, withLet) {
+function writeProperty(property, declare) {
writeComment(property.description);
- if (!/^[\w$]+$/.test(property.name)) // incompatible
- write("// ");
- if (withLet)
+ if (declare)
write("let ");
write(property.name);
if (property.optional)
@@ -462,6 +460,8 @@ function handleNamespace(element/*, parent*/) {
var first = true;
if (element.properties)
element.properties.forEach(function(property) {
+ if (!/^[$\w]+$/.test(property.name)) // incompatible in namespace
+ return;
if (first) {
begin(element);
writeln("namespace ", element.name, " {");