import { Component } from "../component"; import { Context } from "../context"; import { Content } from "../dom"; export declare class Embed extends Component { /** * Embed a content into the current output component. * * @param content The content to embed. * @param args The arguments to pass to the content, if the content is a view function. */ $main(content: Content, ...args: [_: Context] extends Args ? Args | [] : Args): void; } /** * A function that returns a promise of a object whose default export is a content. * * @example * ```ts * const loader: AsyncContentLoader = () => import("./myView.ts"); * ``` */ export type AsyncContentLoader = () => Promise<{ default: Content; }>; export declare class AsyncEmbed extends Component { loadedContent: Content | null; /** * Like `embed`, but the content is loaded asynchronously. * * @example * ```ts * _.asyncEmbed(() => import("./myView.ts")); * ``` * * @param contentLoader A function that returns a promise of a object whose default export is a content. * @param args The arguments to pass to the content, if the content is a view function. */ $main(contentLoader: AsyncContentLoader, ...args: [_: Context] extends Args ? Args | [] : Args): void; } //# sourceMappingURL=embed.d.ts.map