function containsChildOfType(node, type) {
  return containsChildMatching(node, function(node) {
    return node.type === type;
  });
}
Checks whether a node or any of its sub-nodes contains
a syntactic construct of the passed type.
@param {object} node - AST node to test.
@param {string} type - node type to lookup.