Skip to content

Commit 655345c

Browse files
committed
Restore ctor() and fix addChild()
* ctor() needs to be defined so that derived classes can call it without error. * addChild() needs the tag parameter to be optional.
1 parent 8dd3561 commit 655345c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugins/enum.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ function dumpObject(node,isClass) {
186186
var returns = node.returns || "any";
187187
node.params = node.params || "";
188188
var name= node.name;
189-
if (name==="ctor")
190-
name = "constructor";
191189

192190
// Constructors are implicitly static
193191
if (name==="constructor") {
@@ -448,6 +446,10 @@ exports.handlers = {
448446
}
449447
}
450448

449+
if (e.doclet.name==="ctor") {
450+
thisNode.params = "...p:any";
451+
thisNode.returns = "any";
452+
}
451453
if (e.doclet.name==='create') {
452454
thisNode.params = "...p:any";
453455
thisNode.returns = "any";
@@ -465,7 +467,7 @@ exports.handlers = {
465467
thisNode.params = "...p:any";
466468
}
467469
if (e.doclet.name==='addChild') {
468-
thisNode.params = "child:Node,localZOrder:number,tag:number|string|Point";
470+
thisNode.params = "child:Node,localZOrder:number,tag?:number|string|Point";
469471
}
470472
if (e.doclet.name==='removeChild') {
471473
thisNode.params = "child:Node";

0 commit comments

Comments
 (0)