The best solution would be to throw an error on the catch, instead of undefining the return type. The undefined type removes the whole point of using TypeScript otherwise.
Try this:
export const getMarkets = async (): Promise<IGetMarketsRes> => {
try {
// Your code :)
} catch (err) {
// Throw error
throw(err)
}
}