Update the Polymer pass to allow for let, var or const as the declaration type for matching PolymerExterns.
(They should be consistent, but at least this allows us freedom in future).
@@ -60,7 +60,8 @@ final class PolymerPassFindExterns extends AbstractPostOrderCallback {
* @return Whether the node is the declaration of PolymerElement.
*/
private static boolean isPolymerElementExterns(Node value) {
- return value != null && value.isVar()
+ // Explicitly allow var, let or const.
+ return NodeUtil.isNameDeclaration(value)
&& value.getFirstChild().matchesQualifiedName(POLYMER_ELEMENT_NAME);
}
