/** * Async directive rendering utilities for server-side rendering. * * @packageDocumentation */ import { Directive, Expression, FallbackOption } from '../types.js'; import { ContextKey } from '../context-registry.js'; /** * A pending stream chunk for async directives in stream mode. * Used by renderStream() to emit replacement scripts after initial HTML. * * @internal */ export interface StreamPendingChunk { asyncId: string; el: Element; fn: Directive; options: { template?: FallbackOption; [key: string]: unknown; }; scopeState: Record; rootState: Record; expr: Expression; using?: ContextKey[]; } /** * Get the nesting depth of an async directive by walking up the DOM. * * @internal */ export declare function getAsyncDepth(el: Element, depthMap: WeakMap): number; /** * Render fallback content for an async directive. * * @internal */ export declare function renderFallback(el: Element, fallback: FallbackOption, options: { template?: unknown; [key: string]: unknown; }, ssrMode: string, streamCtx?: { fn: Directive; scopeState: Record; rootState: Record; expr: Expression; using?: ContextKey[]; streamPending: StreamPendingChunk[]; }): Promise;