@typstyle/typstyle-wasm-bundler
v0.14.4
Published
WebAssembly bindings for Typstyle
Readme
typstyle-wasm
WebAssembly bindings for Typstyle, a beautiful and reliable Typst code formatter.
⚠️ API Stability Warning: The API is unstable and may change in any future version.
Installation
# For bundlers (Webpack, Vite, etc.)
npm install @typstyle/typstyle-wasm-bundlerUsage
Bundler Target
import { format } from "@typstyle/typstyle-wasm-bundler";
const formatted = format("#let x=1", {}); // Format with default configAPI
format(text: string, config: Config): string- Format Typst codeformat_ir(text: string, config: Config): string- Return formatting IRparse(text: string): string- Parse code and return AST debug string
Configuration
See the auto-generated docstring of Config type.
License
Apache License 2.0. See LICENSE.
