/** * Options for defining a property. */ export interface PropertyOptions { type?: NumberConstructor | StringConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor; attribute?: string | false; reflect?: boolean; default?: any; } /** * Property declarations for a component. */ export interface PropertyDeclarations { [key: string]: PropertyOptions; } /** * Signal key prefix — used to look up a property's backing signal on an instance. * e.g. element.__sig_count → Signal for property "count" */ export declare const SIGNAL_KEY_PREFIX = "__sig_"; export declare const LOCAL_SIGNAL_KEY_PREFIX = "__local_sig_"; /** * Creates signal-backed property accessors for `static properties`. * * - Getter returns the PLAIN VALUE — `this.count` → `5`, not a Signal. * This preserves natural JS idioms: `this.count === 0`, `this.count * 2`, etc. * - Setter writes to the backing signal. * - The signal can be retrieved via `element.__sig_` for subscriptions. * - `requestUpdate()` is wired up in `MiuraElement.connectedCallback()` via * `_subscribePropertySignals()`, so DOM updates are triggered automatically. */ export declare function createProperties(instance: any, properties: PropertyDeclarations): void; /** * Creates signal-backed property accessors for `static state()`. * * Identical to `static properties` in reactivity — setting a state property * notifies only the DOM bindings that reference it (fine-grained, no full * re-render). The ONLY difference from `static properties` is that state * properties are NEVER reflected to HTML attributes and are not added to * `observedAttributes` — they are internal to the component. */ export declare function createStateProperties(instance: any, properties: PropertyDeclarations): void; /** * Creates signal-backed local field accessors for `@signal`. * * These fields expose plain property syntax (`this.count = 1`, `this.count`) * while keeping a backing Signal available for direct fine-grained bindings. * * Unlike `static properties` / `static state()`, these are intentionally not * auto-subscribed to `requestUpdate()`. Consumers should bind their backing * signal directly when they want fine-grained DOM updates. */ export declare function createLocalSignalProperties(instance: any, properties: PropertyDeclarations): void; export declare function convertValue(value: unknown, type: PropertyOptions['type']): unknown; //# sourceMappingURL=properties.d.ts.map