/** * A `component` declaration, and the assignment to a state cell that lowers to * a `set` rather than a store. * * D115 P4 R3d: the family owns the two statements whose lowering is the * component instance itself — everything a component's body declares becomes * one setup function, and the reactive assignment is the only statement whose * meaning depends on what that body declared. */ import type { Expression, LoweringHints, Statement } from "@velarscript/compiler/extension"; import { type WebComponentDeclaration as ComponentDeclaration } from "../ast.ts"; type AssignmentStatement = Extract; /** * What component emission reads and writes on the emitter. `currentScope` and * `currentJsxNamespace` are live: the body's JSX is emitted while they name the * instance's scope, and every path restores what it found. */ export interface ComponentEmitHost { currentJsxNamespace: string; currentScope: string | null; readonly hints: LoweringHints; blockAlwaysReturns(statements: readonly Statement[]): boolean; emitMappedExpression(expression: Expression): string; emitMappedStatement(statement: Statement, depth: number): string; emitParameter(name: string, defaultValue: Expression | null, rest?: boolean): string; emitStatementLines(statements: readonly Statement[], depth: number): readonly string[]; } export declare function emitComponent(host: ComponentEmitHost, statement: ComponentDeclaration, depth: number): string; export declare function emitReactiveAssignment(host: ComponentEmitHost, statement: AssignmentStatement, depth: number): string | null; export {}; //# sourceMappingURL=components.d.ts.map