marko
Version:
Optimized runtime for Marko templates.
4 lines (3 loc) • 335 B
TypeScript
import type { Section } from "./sections";
export declare function createProgramState<T>(init: () => T): readonly [() => T, (value: T) => void];
export declare function createSectionState<T = unknown>(key: string, init?: ((section: Section) => T) | (() => T)): readonly [(section: Section) => T, (section: Section, value: T) => void];