function resolveValueForIdentifierNode(node, rootNode, callback) {
    if (
      rootNode
      && node
      && node.type === 'Identifier'
    ) {
      const scope = getScope(context, rootNode);
      const identVariable = scope.variableScope.variables.find(
        (variable) => variable.name === node.name
      );
      if (identVariable) {
        const definition = identVariable.defs[identVariable.defs.length - 1];
        callback(definition.node.init);
      }
    }
  }
Resolve node of type Identifier when building declaration types.
@param {ASTNode} node
@param {ASTNode} rootNode
@param {Function} callback called with the resolved value only if resolved.