Skip to content

Commit

Permalink
Ignore private annotation for constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
James Lambert committed Jun 29, 2016
1 parent 64b8c88 commit 4384cff
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ private int declareNamespace(String namespace, TypedVar symbol, String emitName,
emitNamespaceBegin(namespace);
TreeWalker treeWalker = new TreeWalker(compiler.getTypeRegistry(), provides, isExtern);
if (isDefault) {
if (isPrivate(symbol.getJSDocInfo())) {
if (isPrivate(symbol.getJSDocInfo()) && !symbol.getJSDocInfo().isConstructor()) {
treeWalker.emitPrivateValue(emitName);
} else {
treeWalker.walk(symbol, emitName);
Expand Down Expand Up @@ -1644,6 +1644,7 @@ && getSuperType(type) == null) {
// Constructors.
if (type.isConstructor() && (type).getParameters().iterator().hasNext()) {
maybeEmitJsDoc(type.getJSDocInfo(), /* ignoreParams */ false);
// TODO mark constuctor as private when source is annoated with @private for ts v2.0 and greater
emit("constructor");
visitFunctionParameters(type, false, classTemplateTypeNames);
emit(";");
Expand Down

0 comments on commit 4384cff

Please sign in to comment.