[ts] The return type of an async function or method must be the global Promise<T> type. [1064]
I’m getting this message after setting the return type in the asdocs but it seems to be working:
/**
* Get artboard preferences
* @param {Artboard} artboard
* @returns {String}
*/
async function getPreferences(artboard) {
⋮
return "test";
}
var preferences = await getPreferences(artboard);
log("Preferences: " + preferences); // "test"
Can you not return values from async
functions? Is the TS warning incorrect? It seems to be working.