Is there a way that we can return the value from a promise? I have this async/await function meant to retrieve the token from another async/await function getToken() but it only returns a promise string to me. However, it does return the intended value in console log. What would be the best workaround for me to access the value itself and not a promise string like in the picture below?
const retToken = async(): Promise<any> => {
const value = await getToken();
console.log('value: ', value);
return value;
}
console.log('retToken: ', retToken());