function findVariableByName(node, name) {
      const variable = variableUtil
        .getVariableFromContext(context, node, name);

      if (!variable || !variable.defs[0] || !variable.defs[0].node) {
        return null;
      }

      if (variable.defs[0].node.type === 'TypeAlias') {
        return variable.defs[0].node.right;
      }

      return variable.defs[0].node.init;
    }
Find a variable by name in the current scope.
@param  {ASTNode} node The node to look for.
@param  {string} name Name of the variable to look for.
@returns {ASTNode|null} Return null if the variable could not be found, ASTNode otherwise.