@gomani/dsl@1.2.0
npm size budget10.5 KB / 14.0 KB ✓
@gomani/dsl
A .goma file is ----delimited frontmatter (TypeScript logic + an island directive) plus a template. The compiler lowers it to @gomani/core calls, hoists all static structure to zero-JavaScript HTML, and rejects an event handler in a static route as a located error — so a passing route ships zero JavaScript by construction. Type errors in {expr} land in the .goma.
API
compile
function
compile(source: string, filename: string): CompileResult
Compile a .goma file to a @gomani/core module (jsx()/island() calls) with a source map back to the template.
analyze
function
analyze(source: string, filename: string): Diagnostic[]
Prove the zero-JavaScript guarantee: an on* handler in a static route is a located, rejected diagnostic.
createGomaLanguageService
function
createGomaLanguageService(): GomaLanguageService
A persistent language service — diagnostics, completions, and hover that answer inside template {…} by bridging to TypeScript.