The type of the value in the option.
A PendingOption resolving to the provided or produced option.
const x = pendingOption(some(42));
const y = pendingOption(() => Promise.resolve(none<string>()));
const z = pendingOption(async () => some("thing"));
expect(await x).toStrictEqual(some(42));
expect(await y).toStrictEqual(none());
expect(await z).toStrictEqual(some("thing"));
Creates a PendingOption<T> from an option, promise, or factory function.
Accepts an Option, a
Promise
resolving to an Option, or a function returning either, and converts it into a pending option, handling asynchronous resolution as needed.