/**
 * Checks if a type reference matches the target type name
 * @param {object} typeRefNode - The type reference node
 * @param {string} targetTypeName - The target type name to match
 * @returns {boolean} True if the type reference matches the target
 */
export default function checkTypeReference(typeRefNode, targetTypeName) {
  if (typeRefNode?.type === 'TSTypeReference' && typeRefNode.typeName?.type === 'Identifier') {
    return typeRefNode?.typeName?.name === targetTypeName;
  }
  return false;
}
