UNPKG

return-style

Version:

Non-intrusively convert the result of any function or promise to the user's desired style.

4 lines (3 loc) 182 B
import { Awaitable } from '@blackglory/prelude'; import { Option } from "../classes/option.js"; export declare function toOptionAsync<T>(fn: () => Awaitable<T>): Promise<Option<T>>;