UNPKG

marko

Version:

Optimized runtime for Marko templates.

5 lines (4 loc) • 354 B
import { type Opt } from "./optional"; export declare function createCyclicMemo<K extends object, R>(compute: (key: K) => R, cycleAnswer: R): (key: K) => R; export type MemoPath = Opt<string> | true; export declare function createCyclicPathMemo<K extends object, R>(compute: (key: K, path: MemoPath) => R, cycleAnswer: R): (key: K, path: MemoPath) => R;