API reference > @kontsedal/olas-core > LazyChild
LazyChild type โ
Handle returned by ctx.lazyChild(...). status walks `idle โ loading โ (ready | error); apibecomes defined oncestatus === 'ready'`. A disposed handle, by dispose() or by its parent's, reads 'idle' with noapi, and its load() rejects. SPEC ยง16.5.
Signature:
typescript
type LazyChild<Api> = {
readonly status: ReadSignal<'idle' | 'loading' | 'ready' | 'error'>;
readonly api: ReadSignal<Api | undefined>;
readonly error: ReadSignal<unknown | undefined>;
load(): Promise<Api>;
dispose(): void;
};References: ReadSignal