use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use framework "AppKit"
use scripting additions
current application's NSPasteboard's generalPasteboard()'s pasteboardItems()'s firstObject()'s |types|() as list