Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
15 lines
586 B
Plaintext
15 lines
586 B
Plaintext
import * as React from 'react';
|
|
export type AwaitOptions<T> = {
|
|
promise: Promise<T>;
|
|
};
|
|
/** Suspend until a deferred promise resolves or rejects and return its data. */
|
|
export declare function useAwaited<T>({ promise: _promise }: AwaitOptions<T>): T;
|
|
/**
|
|
* Component that suspends on a deferred promise and renders its child with
|
|
* the resolved value. Optionally provides a Suspense fallback.
|
|
*/
|
|
export declare function Await<T>(props: AwaitOptions<T> & {
|
|
fallback?: React.ReactNode;
|
|
children: (result: T) => React.ReactNode;
|
|
}): import("react/jsx-runtime").JSX.Element;
|