This solution is generated by ChatGPT, correctness is not guaranteed.

AI solution for TypeScript puzzle on BFE.dev
25. implement UnwrapPromise<T>

type UnwrapPromise<T> = T extends Promise<infer U> ? U : Error;