I was declaring them just the same, as follows:
#pragma once
typedef union itemValue{
float fValue;
int32 iValue;
}ItemValue;
#include "GameFramework/Actor.h"
#include "Item.generated.h"
/**
*
*/
UCLASS()
class AItem : public AActor
{
GENERATED_UCLASS_BODY()
UPROPERTY()
TSubobjectPtr<class UStaticMeshComponent> Mesh;
UPROPERTY()
FString ItemName;
UPROPERTY()
ItemValue Value;
//The Properties and Functions continue
But I still get a build error: