import { GlobalVariable } from "@gongt/ts-stl-library/pattern/global-page-data"; import { Options as EjsOptions } from "ejs"; import { Request, RequestHandler, Response } from "express-serve-static-core"; export interface IContainerPlugin { __modify_html(html: HtmlContainer, options?: Partial): void; } export interface DynamicCallback { (context: RenderContext): Promise | void; } export interface DynamicCallbackDebug { name: string; cb: DynamicCallback; } export declare class HtmlContainer { private _lastOptions; private _meta; private _favicon; private _body; private _jsData; private _head; private _script; private _script_dbg; private _stylesheet; private renderFn; private dynamicCallbacks; private deps; private fileWatch; meta(name: string, content: string): void; property(name: string, content: string): void; httpEquiv(name: string, content: string): void; favicon(fileUrl: string): void; stylesheet(url: string, id?: string): void; addHead(head: string): void; addBody(body: string): void; addJavascript(script: string): void; script(url: string, debugTag?: string): void; plugin(content: IContainerPlugin, options?: Partial): void; dynamic(fn: DynamicCallback): any; dynamic(name: string, fn: DynamicCallback): any; protected _base: string; base(url: string): void; private readonly baseTag; protected _title: string; title(str: string): void; private readonly titleTag; compile(options?: EjsOptions): void; private change(); private deferred; defer(fn: any): void; createMiddleware(): RequestHandler; render(context: RenderContext): Promise; private compileAllDeps({dependencies}); private registerWatchTemplate(); } export interface RenderContext { global: GlobalVariable; variables: { [key: string]: string; }; request: Request; } export declare type DeferredFunction = (context: RenderContext, res: Response) => void;