/** * Taffy Layout: TypeScript wrapper for Taffy WASM bindings * * This module provides the `loadTaffy` function for initializing the WASM module * and re-exports all types and functions from the underlying WASM bindings. * * @example * ```typescript * import { loadTaffy, TaffyTree, Style, Display } from 'taffy-layout'; * * await loadTaffy(); * * const tree = new TaffyTree(); * const style = new Style(); * style.display = Display.Flex; * const node = tree.newLeaf(style); * ``` */ export * from "../pkg/taffy_wasm.js"; export type { InitOutput } from "../pkg/taffy_wasm.js"; import type { InitOutput } from "../pkg/taffy_wasm.js"; /** * Universal initialization function for Taffy WASM module. * * Automatically detects the environment (Web or Node.js) and loads the WASM accordingly. * - In a **Web environment**, it uses `fetch` to load the WASM file. * - In a **Node.js environment**, it uses `fs` to read the WASM file. * * @returns - A promise that resolves to the WASM module exports. * * @example * ```typescript * import { loadTaffy } from 'taffy-layout'; * await loadTaffy(); * ``` */ export declare function loadTaffy(): Promise; export default loadTaffy; //# sourceMappingURL=index.d.ts.map