This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/node_modules/next/dist/server/lib/lazy-result.d.ts
T
Kismet Hasanaj 34dc9aec52 .
2026-05-02 20:07:02 +02:00

14 lines
568 B
TypeScript

export type LazyResult<TValue> = PromiseLike<TValue> & {
value?: TValue;
};
export type ResolvedLazyResult<TValue> = PromiseLike<TValue> & {
value: TValue;
};
/**
* Calls the given function only when the returned promise-like object is
* awaited. Afterwards, it provides the resolved value synchronously as `value`
* property.
*/
export declare function createLazyResult<TValue>(fn: () => Promise<TValue> | TValue): LazyResult<TValue>;
export declare function isResolvedLazyResult<TValue>(result: LazyResult<TValue>): result is ResolvedLazyResult<TValue>;