I have a scenario where an async function is declared with a return type as follows:
async function getNumber() {
const {number} = await API_getNumber();
return number;
}
export type Return = ReturnType<typeof getNumber>
In this case, Return
is Promise<number>
. Now, I need to use this return type but extract only the number
part without the promise. Is it possible to achieve this?