export default function usePromise(promiseOrFn: (() => Promise) | Promise): { loading: boolean; error: Error | null; value: T | undefined; };