The DataTransfer.types read-only property returns the available types that exist in the DataTransfer.items.
DataTransfer.types
MDN Reference