UNPKG

marko

Version:

Optimized runtime for Marko templates.

29 lines (28 loc) 1.52 kB
import { register } from "./serializer"; import type { ServerRenderer } from "./template"; import { _await, _html, _peek_scope_id, _scope_id, $global, Chunk, getChunk, isInResumedBranch, State, withChunk, writeScript } from "./writer"; export declare const compat: { $global: typeof $global; fork: typeof _await; write: typeof _html; writeScript: typeof writeScript; nextScopeId: typeof _scope_id; peekNextScopeId: typeof _peek_scope_id; isInResumedBranch: typeof isInResumedBranch; withChunk: typeof withChunk; getChunk: typeof getChunk; ensureState($global: any): State; isTagsAPI(fn: any): boolean; onFlush(fn: (chunk: Chunk) => void): void; patchDynamicTag: (patch: (tag: unknown, scopeId: number, accessor: import("../common/types").Accessor) => unknown) => void; writeSetScopeForComponent(branchId: number, m5c: string, m5i: unknown): void; toJSON(): (this: WeakKey) => [registryId: string, scopeId: unknown] | undefined; createChunk($global: any): Chunk; flushScript($global: any, chunk?: Chunk): string; render(renderer: ServerRenderer, willRerender: boolean, classAPIOut: any, component: any, input: any, completeChunks: Chunk[], registerChildScope?: boolean): void; register: typeof register; registerRenderBody(fn: any): void; registerClassFunctions(input: any): void; registerClassFunction<T extends WeakKey>($global: object, id: string, fn: T, hostId: string): T; hasPendingClassFunctions($global: object): boolean; };