PendingPromise<T>
Namespace: Vercel.AI.Operations
public sealed class PendingPromise<T>A promise that can be resolved once.
Type parameters
| Name | Description |
|---|---|
T |
Inheritance: object
Properties
Section titled “Properties”IsPending
Section titled “IsPending”public bool IsPending { get; }True until Resolve(%600) or Exception).
Value: bool
IsResolved
Section titled “IsResolved”public bool IsResolved { get; }True after Resolve(%600).
Value: bool
public Task<T> Task { get; }The underlying task.
Value: Task<T>
Methods
Section titled “Methods”Reject(Exception)
Section titled “Reject(Exception)”public void Reject(Exception error)Rejects the promise when it is still pending.
Parameters
| Name | Type | Description |
|---|---|---|
error |
Exception |
Resolve(T)
Section titled “Resolve(T)”public void Resolve(T value)Resolves the promise when it is still pending.
Parameters
| Name | Type | Description |
|---|---|---|
value |
T |
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product