Skip to content

Commit 4d12b81

Browse files
kevinoconnor7copybara-github
authored andcommitted
Define a IS_CONSTRUCTOR_OR_CLASS conformance Precondition
PiperOrigin-RevId: 893147236
1 parent 9d36106 commit 4d12b81

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/com/google/javascript/jscomp/CheckConformance.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ public boolean shouldCheck(Node n) {
128128
return true;
129129
}
130130
};
131+
132+
public static final Precondition IS_CONSTRUCTOR_OR_CLASS =
133+
n -> n.isClass() || NodeUtil.isConstructor(n);
131134
}
132135

133136
private static final class Category {

0 commit comments

Comments
 (0)