Attaches callbacks for the resolution and/or rejection of the Promise.
then<
TResult1 = UsageMetadata | undefined,
TResult2 = never
>(
onfulfilled: (value: UsageMetadata | undefined) => TResult1 | PromiseLike<TResult1> | null, onrejected: (reason: unknown) => TResult2 | PromiseLike<TResult2> | null
): PromiseLike<TResult1 | TResult2>| Name | Type | Description |
|---|---|---|
onfulfilled | (value: UsageMetadata | undefined) => TResult1 | PromiseLike<TResult1> | null | The callback to execute when the Promise is resolved. |
onrejected | (reason: unknown) => TResult2 | PromiseLike<TResult2> | null | The callback to execute when the Promise is rejected. |