Following link will give you some idea for exporting the asset
https://community.adobe.com/t5/illustrator/what-s-new-in-illustrator-scripting-cc2018/m-p/9422236
I just wrote simple script that will export selected items as a PDF. I hope this will help
var doc = app.activeDocument;
var docAssets = doc.assets;
var assetIDArray = new Array();
var itemToExport = new ExportForScreensItemToExport();
itemToExport.artboards = '';
itemToExport.document = false;
var assetArray = new Array();
for (var i = 0; i < app.selection.length; i++) {
var asset = docAssets.add(app.selection[i]);
assetIDArray.push(asset.assetID);
}
itemToExport.assets = assetIDArray;
var options = new ExportForScreensPDFOptions();
app.activeDocument.exportForScreens(File('~/Desktop'), ExportForScreensType.SE_PDF, options, itemToExport);
Before you run the script, select all items that you want to export. Here is the descrtiption what script do.
1. First it will create assets from the selected items.
2. Export all assets as a PDF at Desktop.
NOTE: If you run the script second time, it will add assests back to the assets panel so assets will increase. You can handle it by checking if selected element as an assets already exists then don't add inside the Asset panel.