pendingNone
@ts-rust/std / Option / pendingNone
Function: pendingNone()
function pendingNone<T>(): PendingOption<Awaited<T>>;
Defined in: packages/std/src/option/option.ts:111
Creates a PendingOption\<T\> that resolves to None.
Produces a pending option representing the absence of a value, with the type
resolved to Awaited
for consistency with asynchronous operations.
Type Parameters
Type Parameter | Description |
---|---|
| The type of the absent value. |
Returns
PendingOption
<Awaited
<T
>>
A PendingOption resolving to None.
Example
const x = pendingNone<number>();
expect(await x).toStrictEqual(none());
expect((await x).isNone()).toBe(true);